{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "The AMLTK (https://github.com/automl/amltk) provides a framework for developing AutoML systems. One component of this system is the search space definitions. \n",
    "\n",
    "TPOT provides a function called tpot.utils.tpot_parser which can convert a search space defined in the AMLTK API into the search space class used by TPOT. This allows users to define a single search space to be used by both algorithms, facilitating better comparisons. Below is an example of a few search spaces defined in AMLTK and how to use them in TPOT.\n",
    "\n",
    "Note: this feature is still experimental and not all features present in the AMLTK API are fully supported in TPOT yet. (For example, automated splitting based on categorical vs numeric with amltk.pipeline.Split is not currently implemented in the parser.)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [
    {
     "ename": "ModuleNotFoundError",
     "evalue": "No module named 'amltk'",
     "output_type": "error",
     "traceback": [
      "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
      "\u001b[0;31mModuleNotFoundError\u001b[0m                       Traceback (most recent call last)",
      "Cell \u001b[0;32mIn[1], line 7\u001b[0m\n\u001b[1;32m      5\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[38;5;21;01msklearn\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mpreprocessing\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[38;5;28;01mimport\u001b[39;00m OneHotEncoder\n\u001b[1;32m      6\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[38;5;21;01msklearn\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01msvm\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[38;5;28;01mimport\u001b[39;00m SVC\n\u001b[0;32m----> 7\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[38;5;21;01mamltk\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mpipeline\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[38;5;28;01mimport\u001b[39;00m Choice, Component, Sequential, Split\n\u001b[1;32m      8\u001b[0m \u001b[38;5;28;01mimport\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[38;5;21;01mtpot\u001b[39;00m\n\u001b[1;32m      9\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[38;5;21;01msklearn\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mpreprocessing\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[38;5;28;01mimport\u001b[39;00m FunctionTransformer\n",
      "\u001b[0;31mModuleNotFoundError\u001b[0m: No module named 'amltk'"
     ]
    }
   ],
   "source": [
    "from sklearn.compose import make_column_selector\n",
    "import numpy as np\n",
    "from sklearn.ensemble import RandomForestClassifier\n",
    "from sklearn.impute import SimpleImputer\n",
    "from sklearn.preprocessing import OneHotEncoder\n",
    "from sklearn.svm import SVC\n",
    "from amltk.pipeline import Choice, Component, Sequential, Split\n",
    "import tpot\n",
    "from sklearn.preprocessing import FunctionTransformer\n",
    "from sklearn.compose import make_column_transformer\n",
    "import tpot\n",
    "import numpy as np\n",
    "import sklearn\n",
    "import sklearn.datasets\n",
    "import pandas as pd\n",
    "# create dummy pandas dataset with both categorical and numerical columns\n",
    "X, y = sklearn.datasets.make_classification(n_samples=100, n_features=5, n_informative=3, n_classes=2, random_state=42)\n",
    "X = pd.DataFrame(X, columns=[f\"num_{i}\" for i in range(5)])\n",
    "# add 5 categorical columns\n",
    "for i in range(5):\n",
    "    X[f\"cat_{i}\"] = np.random.choice([\"A\", \"B\", \"C\"], size=100)\n",
    "y = y.flatten()\n",
    "# train test split\n",
    "X_train, X_test, y_train, y_test = sklearn.model_selection.train_test_split(X, y, test_size=0.5)\n",
    "\n",
    "# TODO: implement support for this condition\n",
    "# select_categories = make_column_selector(dtype_include=object)\n",
    "# select_numerical = make_column_selector(dtype_include=np.number)\n",
    "\n",
    "# split_imputation = Split(\n",
    "#     {\n",
    "#         \"categories\": [SimpleImputer(strategy=\"constant\", fill_value=\"missing\"), OneHotEncoder(drop=\"first\")],\n",
    "#         \"numerics\": Component(SimpleImputer, space={\"strategy\": [\"mean\", \"median\"]}),\n",
    "#     },\n",
    "#     config={\"categories\": select_categories, \"numerics\": select_numerical}, #not yet supported\n",
    "#     name=\"feature_preprocessing\",\n",
    "# )\n",
    "# split_imputation\n",
    "\n",
    "select_categories = make_column_selector(dtype_include=object)\n",
    "select_numerical = make_column_selector(dtype_include=np.number)\n",
    "\n",
    "cat_selector = make_column_transformer((\"passthrough\", select_categories))\n",
    "num_selector = make_column_transformer((\"passthrough\", select_numerical))\n",
    "\n",
    "\n",
    "split_imputation = Split(\n",
    "    {\n",
    "        \"categories\": [cat_selector,SimpleImputer(strategy=\"constant\", fill_value=\"missing\"), OneHotEncoder(drop=\"first\", sparse_output=False)],\n",
    "        \"numerics\": [num_selector, Component(SimpleImputer, space={\"strategy\": [\"mean\", \"median\"]})],\n",
    "    },\n",
    "    name=\"split_imputation\",\n",
    ")\n",
    "split_imputation"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\"><span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">╭─ </span><span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f; font-weight: bold\">Sequential</span><span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">(</span><span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f; font-style: italic\">my_pipeline</span><span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">) ───────────────────────────────────────────────────────────────────────────────────────╮</span>\n",
       "<span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">│</span> <span style=\"color: #777da7; text-decoration-color: #777da7\">╭─ </span><span style=\"color: #777da7; text-decoration-color: #777da7; font-weight: bold\">Split</span><span style=\"color: #777da7; text-decoration-color: #777da7\">(</span><span style=\"color: #777da7; text-decoration-color: #777da7; font-style: italic\">split_imputation</span><span style=\"color: #777da7; text-decoration-color: #777da7\">) ───────────────────────────────────────────────────────────────────────────────────╮</span> <span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">│</span>\n",
       "<span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">│</span> <span style=\"color: #777da7; text-decoration-color: #777da7\">│</span> <span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">╭─ </span><span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f; font-weight: bold\">Sequential</span><span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">(</span><span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f; font-style: italic\">categories</span><span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">) ─────────────────────────╮</span> <span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">╭─ </span><span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f; font-weight: bold\">Sequential</span><span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">(</span><span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f; font-style: italic\">numerics</span><span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">) ─────────────────────────────╮</span> <span style=\"color: #777da7; text-decoration-color: #777da7\">│</span> <span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">│</span>\n",
       "<span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">│</span> <span style=\"color: #777da7; text-decoration-color: #777da7\">│</span> <span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">│</span> <span style=\"color: #56351e; text-decoration-color: #56351e\">╭─ </span><span style=\"color: #56351e; text-decoration-color: #56351e; font-weight: bold\">Fixed</span><span style=\"color: #56351e; text-decoration-color: #56351e\">(</span><span style=\"color: #56351e; text-decoration-color: #56351e; font-style: italic\">ColumnTransformer</span><span style=\"color: #56351e; text-decoration-color: #56351e\">) ───────────────────╮</span> <span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">│</span> <span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">│</span> <span style=\"color: #56351e; text-decoration-color: #56351e\">╭─ </span><span style=\"color: #56351e; text-decoration-color: #56351e; font-weight: bold\">Fixed</span><span style=\"color: #56351e; text-decoration-color: #56351e\">(</span><span style=\"color: #56351e; text-decoration-color: #56351e; font-style: italic\">ColumnTransformer</span><span style=\"color: #56351e; text-decoration-color: #56351e\">) ─────────────────────╮</span> <span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">│</span> <span style=\"color: #777da7; text-decoration-color: #777da7\">│</span> <span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">│</span>\n",
       "<span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">│</span> <span style=\"color: #777da7; text-decoration-color: #777da7\">│</span> <span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">│</span> <span style=\"color: #56351e; text-decoration-color: #56351e\">│</span> <span style=\"color: #000000; text-decoration-color: #000000\">item </span><span style=\"color: #800080; text-decoration-color: #800080; font-weight: bold\">ColumnTransformer</span><span style=\"color: #000000; text-decoration-color: #000000; font-weight: bold\">(</span><span style=\"color: #808000; text-decoration-color: #808000\">transformers</span><span style=\"color: #000000; text-decoration-color: #000000\">=</span><span style=\"color: #000000; text-decoration-color: #000000; font-weight: bold\">[(</span><span style=\"color: #008000; text-decoration-color: #008000\">'pass…</span> <span style=\"color: #56351e; text-decoration-color: #56351e\">│</span> <span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">│</span> <span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">│</span> <span style=\"color: #56351e; text-decoration-color: #56351e\">│</span> <span style=\"color: #000000; text-decoration-color: #000000\">item </span><span style=\"color: #800080; text-decoration-color: #800080; font-weight: bold\">ColumnTransformer</span><span style=\"color: #000000; text-decoration-color: #000000; font-weight: bold\">(</span><span style=\"color: #808000; text-decoration-color: #808000\">transformers</span><span style=\"color: #000000; text-decoration-color: #000000\">=</span><span style=\"color: #000000; text-decoration-color: #000000; font-weight: bold\">[(</span><span style=\"color: #008000; text-decoration-color: #008000\">'passth…</span> <span style=\"color: #56351e; text-decoration-color: #56351e\">│</span> <span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">│</span> <span style=\"color: #777da7; text-decoration-color: #777da7\">│</span> <span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">│</span>\n",
       "<span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">│</span> <span style=\"color: #777da7; text-decoration-color: #777da7\">│</span> <span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">│</span> <span style=\"color: #56351e; text-decoration-color: #56351e\">│</span> <span style=\"color: #000000; text-decoration-color: #000000\">     </span><span style=\"color: #008000; text-decoration-color: #008000\">'passthrough'</span><span style=\"color: #000000; text-decoration-color: #000000\">,                         </span> <span style=\"color: #56351e; text-decoration-color: #56351e\">│</span> <span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">│</span> <span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">│</span> <span style=\"color: #56351e; text-decoration-color: #56351e\">│</span> <span style=\"color: #000000; text-decoration-color: #000000\">     </span><span style=\"color: #008000; text-decoration-color: #008000\">'passthrough'</span><span style=\"color: #000000; text-decoration-color: #000000\">,                           </span> <span style=\"color: #56351e; text-decoration-color: #56351e\">│</span> <span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">│</span> <span style=\"color: #777da7; text-decoration-color: #777da7\">│</span> <span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">│</span>\n",
       "<span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">│</span> <span style=\"color: #777da7; text-decoration-color: #777da7\">│</span> <span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">│</span> <span style=\"color: #56351e; text-decoration-color: #56351e\">│</span> <span style=\"color: #000000; text-decoration-color: #000000\">                                      </span><span style=\"color: #000000; text-decoration-color: #000000; font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">skle…</span> <span style=\"color: #56351e; text-decoration-color: #56351e\">│</span> <span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">│</span> <span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">│</span> <span style=\"color: #56351e; text-decoration-color: #56351e\">│</span> <span style=\"color: #000000; text-decoration-color: #000000\">                                      </span><span style=\"color: #000000; text-decoration-color: #000000; font-weight: bold\">&lt;</span><span style=\"color: #ff00ff; text-decoration-color: #ff00ff; font-weight: bold\">sklear…</span> <span style=\"color: #56351e; text-decoration-color: #56351e\">│</span> <span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">│</span> <span style=\"color: #777da7; text-decoration-color: #777da7\">│</span> <span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">│</span>\n",
       "<span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">│</span> <span style=\"color: #777da7; text-decoration-color: #777da7\">│</span> <span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">│</span> <span style=\"color: #56351e; text-decoration-color: #56351e\">│</span> <span style=\"color: #000000; text-decoration-color: #000000\">     object at </span><span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">0x7d354d946290</span><span style=\"color: #000000; text-decoration-color: #000000; font-weight: bold\">&gt;)])</span><span style=\"color: #000000; text-decoration-color: #000000\">           </span> <span style=\"color: #56351e; text-decoration-color: #56351e\">│</span> <span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">│</span> <span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">│</span> <span style=\"color: #56351e; text-decoration-color: #56351e\">│</span> <span style=\"color: #000000; text-decoration-color: #000000\">     object at </span><span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">0x7d34edf94fa0</span><span style=\"color: #000000; text-decoration-color: #000000; font-weight: bold\">&gt;)])</span><span style=\"color: #000000; text-decoration-color: #000000\">             </span> <span style=\"color: #56351e; text-decoration-color: #56351e\">│</span> <span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">│</span> <span style=\"color: #777da7; text-decoration-color: #777da7\">│</span> <span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">│</span>\n",
       "<span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">│</span> <span style=\"color: #777da7; text-decoration-color: #777da7\">│</span> <span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">│</span> <span style=\"color: #56351e; text-decoration-color: #56351e\">╰──────────────────────────────────────────────╯</span> <span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">│</span> <span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">│</span> <span style=\"color: #56351e; text-decoration-color: #56351e\">╰────────────────────────────────────────────────╯</span> <span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">│</span> <span style=\"color: #777da7; text-decoration-color: #777da7\">│</span> <span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">│</span>\n",
       "<span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">│</span> <span style=\"color: #777da7; text-decoration-color: #777da7\">│</span> <span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">│</span> <span style=\"font-weight: bold\">                       ↓                        </span> <span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">│</span> <span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">│</span> <span style=\"font-weight: bold\">                        ↓                         </span> <span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">│</span> <span style=\"color: #777da7; text-decoration-color: #777da7\">│</span> <span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">│</span>\n",
       "<span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">│</span> <span style=\"color: #777da7; text-decoration-color: #777da7\">│</span> <span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">│</span> <span style=\"color: #56351e; text-decoration-color: #56351e\">╭─ </span><span style=\"color: #56351e; text-decoration-color: #56351e; font-weight: bold\">Fixed</span><span style=\"color: #56351e; text-decoration-color: #56351e\">(</span><span style=\"color: #56351e; text-decoration-color: #56351e; font-style: italic\">SimpleImputer</span><span style=\"color: #56351e; text-decoration-color: #56351e\">) ───────────────────────╮</span> <span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">│</span> <span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">│</span> <span style=\"color: #e6af2e; text-decoration-color: #e6af2e\">╭─ </span><span style=\"color: #e6af2e; text-decoration-color: #e6af2e; font-weight: bold\">Component</span><span style=\"color: #e6af2e; text-decoration-color: #e6af2e\">(</span><span style=\"color: #e6af2e; text-decoration-color: #e6af2e; font-style: italic\">SimpleImputer</span><span style=\"color: #e6af2e; text-decoration-color: #e6af2e\">) ─────────────╮</span>         <span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">│</span> <span style=\"color: #777da7; text-decoration-color: #777da7\">│</span> <span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">│</span>\n",
       "<span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">│</span> <span style=\"color: #777da7; text-decoration-color: #777da7\">│</span> <span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">│</span> <span style=\"color: #56351e; text-decoration-color: #56351e\">│</span> <span style=\"color: #000000; text-decoration-color: #000000\">item </span><span style=\"color: #800080; text-decoration-color: #800080; font-weight: bold\">SimpleImputer</span><span style=\"color: #000000; text-decoration-color: #000000; font-weight: bold\">(</span><span style=\"color: #808000; text-decoration-color: #808000\">fill_value</span><span style=\"color: #000000; text-decoration-color: #000000\">=</span><span style=\"color: #008000; text-decoration-color: #008000\">'missing'</span><span style=\"color: #000000; text-decoration-color: #000000\">,    </span> <span style=\"color: #56351e; text-decoration-color: #56351e\">│</span> <span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">│</span> <span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">│</span> <span style=\"color: #e6af2e; text-decoration-color: #e6af2e\">│</span> <span style=\"color: #000000; text-decoration-color: #000000\">item  </span><span style=\"color: #00ffff; text-decoration-color: #00ffff; font-style: italic\">class </span><a href=\"https://www.scikit-learn.org/stable/modules/generated/sklearn.impute.SimpleImputer.html\" target=\"_blank\"><span style=\"color: #000000; text-decoration-color: #000000; text-decoration: underline\">SimpleImputer</span></a><span style=\"color: #000000; text-decoration-color: #000000; font-weight: bold\">(</span><span style=\"color: #808000; text-decoration-color: #808000\">...</span><span style=\"color: #000000; text-decoration-color: #000000; font-weight: bold\">)</span><span style=\"color: #000000; text-decoration-color: #000000\">        </span> <span style=\"color: #e6af2e; text-decoration-color: #e6af2e\">│</span>         <span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">│</span> <span style=\"color: #777da7; text-decoration-color: #777da7\">│</span> <span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">│</span>\n",
       "<span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">│</span> <span style=\"color: #777da7; text-decoration-color: #777da7\">│</span> <span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">│</span> <span style=\"color: #56351e; text-decoration-color: #56351e\">│</span> <span style=\"color: #000000; text-decoration-color: #000000\">     </span><span style=\"color: #808000; text-decoration-color: #808000\">strategy</span><span style=\"color: #000000; text-decoration-color: #000000\">=</span><span style=\"color: #008000; text-decoration-color: #008000\">'constant'</span><span style=\"color: #000000; text-decoration-color: #000000; font-weight: bold\">)</span><span style=\"color: #000000; text-decoration-color: #000000\">                   </span> <span style=\"color: #56351e; text-decoration-color: #56351e\">│</span> <span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">│</span> <span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">│</span> <span style=\"color: #e6af2e; text-decoration-color: #e6af2e\">│</span> <span style=\"color: #000000; text-decoration-color: #000000\">space </span><span style=\"color: #000000; text-decoration-color: #000000; font-weight: bold\">{</span><span style=\"color: #008000; text-decoration-color: #008000\">'strategy'</span><span style=\"color: #000000; text-decoration-color: #000000\">: </span><span style=\"color: #000000; text-decoration-color: #000000; font-weight: bold\">[</span><span style=\"color: #008000; text-decoration-color: #008000\">'mean'</span><span style=\"color: #000000; text-decoration-color: #000000\">, </span><span style=\"color: #008000; text-decoration-color: #008000\">'median'</span><span style=\"color: #000000; text-decoration-color: #000000; font-weight: bold\">]}</span> <span style=\"color: #e6af2e; text-decoration-color: #e6af2e\">│</span>         <span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">│</span> <span style=\"color: #777da7; text-decoration-color: #777da7\">│</span> <span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">│</span>\n",
       "<span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">│</span> <span style=\"color: #777da7; text-decoration-color: #777da7\">│</span> <span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">│</span> <span style=\"color: #56351e; text-decoration-color: #56351e\">╰──────────────────────────────────────────────╯</span> <span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">│</span> <span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">│</span> <span style=\"color: #e6af2e; text-decoration-color: #e6af2e\">╰────────────────────────────────────────╯</span>         <span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">│</span> <span style=\"color: #777da7; text-decoration-color: #777da7\">│</span> <span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">│</span>\n",
       "<span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">│</span> <span style=\"color: #777da7; text-decoration-color: #777da7\">│</span> <span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">│</span> <span style=\"font-weight: bold\">                       ↓                        </span> <span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">│</span> <span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">╰────────────────────────────────────────────────────╯</span> <span style=\"color: #777da7; text-decoration-color: #777da7\">│</span> <span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">│</span>\n",
       "<span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">│</span> <span style=\"color: #777da7; text-decoration-color: #777da7\">│</span> <span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">│</span> <span style=\"color: #56351e; text-decoration-color: #56351e\">╭─ </span><span style=\"color: #56351e; text-decoration-color: #56351e; font-weight: bold\">Fixed</span><span style=\"color: #56351e; text-decoration-color: #56351e\">(</span><span style=\"color: #56351e; text-decoration-color: #56351e; font-style: italic\">OneHotEncoder</span><span style=\"color: #56351e; text-decoration-color: #56351e\">) ───────────────────────╮</span> <span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">│</span>                                                        <span style=\"color: #777da7; text-decoration-color: #777da7\">│</span> <span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">│</span>\n",
       "<span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">│</span> <span style=\"color: #777da7; text-decoration-color: #777da7\">│</span> <span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">│</span> <span style=\"color: #56351e; text-decoration-color: #56351e\">│</span> <span style=\"color: #000000; text-decoration-color: #000000\">item </span><span style=\"color: #800080; text-decoration-color: #800080; font-weight: bold\">OneHotEncoder</span><span style=\"color: #000000; text-decoration-color: #000000; font-weight: bold\">(</span><span style=\"color: #808000; text-decoration-color: #808000\">drop</span><span style=\"color: #000000; text-decoration-color: #000000\">=</span><span style=\"color: #008000; text-decoration-color: #008000\">'first'</span><span style=\"color: #000000; text-decoration-color: #000000\">,            </span> <span style=\"color: #56351e; text-decoration-color: #56351e\">│</span> <span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">│</span>                                                        <span style=\"color: #777da7; text-decoration-color: #777da7\">│</span> <span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">│</span>\n",
       "<span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">│</span> <span style=\"color: #777da7; text-decoration-color: #777da7\">│</span> <span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">│</span> <span style=\"color: #56351e; text-decoration-color: #56351e\">│</span> <span style=\"color: #000000; text-decoration-color: #000000\">     </span><span style=\"color: #808000; text-decoration-color: #808000\">sparse_output</span><span style=\"color: #000000; text-decoration-color: #000000\">=</span><span style=\"color: #ff0000; text-decoration-color: #ff0000; font-style: italic\">False</span><span style=\"color: #000000; text-decoration-color: #000000; font-weight: bold\">)</span><span style=\"color: #000000; text-decoration-color: #000000\">                   </span> <span style=\"color: #56351e; text-decoration-color: #56351e\">│</span> <span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">│</span>                                                        <span style=\"color: #777da7; text-decoration-color: #777da7\">│</span> <span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">│</span>\n",
       "<span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">│</span> <span style=\"color: #777da7; text-decoration-color: #777da7\">│</span> <span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">│</span> <span style=\"color: #56351e; text-decoration-color: #56351e\">╰──────────────────────────────────────────────╯</span> <span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">│</span>                                                        <span style=\"color: #777da7; text-decoration-color: #777da7\">│</span> <span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">│</span>\n",
       "<span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">│</span> <span style=\"color: #777da7; text-decoration-color: #777da7\">│</span> <span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">╰──────────────────────────────────────────────────╯</span>                                                        <span style=\"color: #777da7; text-decoration-color: #777da7\">│</span> <span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">│</span>\n",
       "<span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">│</span> <span style=\"color: #777da7; text-decoration-color: #777da7\">╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────╯</span> <span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">│</span>\n",
       "<span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">│</span> <span style=\"font-weight: bold\">                                                       ↓                                                       </span> <span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">│</span>\n",
       "<span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">│</span> <span style=\"color: #ff4500; text-decoration-color: #ff4500\">╭─ </span><span style=\"color: #ff4500; text-decoration-color: #ff4500; font-weight: bold\">Choice</span><span style=\"color: #ff4500; text-decoration-color: #ff4500\">(</span><span style=\"color: #ff4500; text-decoration-color: #ff4500; font-style: italic\">selectors</span><span style=\"color: #ff4500; text-decoration-color: #ff4500\">) ─────────────────────────────────────────────────────╮</span>                                     <span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">│</span>\n",
       "<span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">│</span> <span style=\"color: #ff4500; text-decoration-color: #ff4500\">│</span> <span style=\"color: #e6af2e; text-decoration-color: #e6af2e\">╭─ </span><span style=\"color: #e6af2e; text-decoration-color: #e6af2e; font-weight: bold\">Component</span><span style=\"color: #e6af2e; text-decoration-color: #e6af2e\">(</span><span style=\"color: #e6af2e; text-decoration-color: #e6af2e; font-style: italic\">SelectKBest</span><span style=\"color: #e6af2e; text-decoration-color: #e6af2e\">) ─────╮</span> <span style=\"color: #e6af2e; text-decoration-color: #e6af2e\">╭─ </span><span style=\"color: #e6af2e; text-decoration-color: #e6af2e; font-weight: bold\">Component</span><span style=\"color: #e6af2e; text-decoration-color: #e6af2e\">(</span><span style=\"color: #e6af2e; text-decoration-color: #e6af2e; font-style: italic\">VarianceThreshold</span><span style=\"color: #e6af2e; text-decoration-color: #e6af2e\">) ─────╮</span> <span style=\"color: #ff4500; text-decoration-color: #ff4500\">│</span>                                     <span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">│</span>\n",
       "<span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">│</span> <span style=\"color: #ff4500; text-decoration-color: #ff4500\">│</span> <span style=\"color: #e6af2e; text-decoration-color: #e6af2e\">│</span> <span style=\"color: #000000; text-decoration-color: #000000\">item  </span><span style=\"color: #00ffff; text-decoration-color: #00ffff; font-style: italic\">class </span><a href=\"https://www.scikit-learn.org/stable/modules/generated/sklearn.feature_selection.SelectKBest.html\" target=\"_blank\"><span style=\"color: #000000; text-decoration-color: #000000; text-decoration: underline\">SelectKBest</span></a><span style=\"color: #000000; text-decoration-color: #000000; font-weight: bold\">(</span><span style=\"color: #808000; text-decoration-color: #808000\">...</span><span style=\"color: #000000; text-decoration-color: #000000; font-weight: bold\">)</span> <span style=\"color: #e6af2e; text-decoration-color: #e6af2e\">│</span> <span style=\"color: #e6af2e; text-decoration-color: #e6af2e\">│</span> <span style=\"color: #000000; text-decoration-color: #000000\">item  </span><span style=\"color: #00ffff; text-decoration-color: #00ffff; font-style: italic\">class </span><a href=\"https://www.scikit-learn.org/stable/modules/generated/sklearn.feature_selection.VarianceThreshold.html\" target=\"_blank\"><span style=\"color: #000000; text-decoration-color: #000000; text-decoration: underline\">VarianceThreshold</span></a><span style=\"color: #000000; text-decoration-color: #000000; font-weight: bold\">(</span><span style=\"color: #808000; text-decoration-color: #808000\">...</span><span style=\"color: #000000; text-decoration-color: #000000; font-weight: bold\">)</span> <span style=\"color: #e6af2e; text-decoration-color: #e6af2e\">│</span> <span style=\"color: #ff4500; text-decoration-color: #ff4500\">│</span>                                     <span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">│</span>\n",
       "<span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">│</span> <span style=\"color: #ff4500; text-decoration-color: #ff4500\">│</span> <span style=\"color: #e6af2e; text-decoration-color: #e6af2e\">│</span> <span style=\"color: #000000; text-decoration-color: #000000\">space </span><span style=\"color: #000000; text-decoration-color: #000000; font-weight: bold\">{</span><span style=\"color: #008000; text-decoration-color: #008000\">'k'</span><span style=\"color: #000000; text-decoration-color: #000000\">: </span><span style=\"color: #000000; text-decoration-color: #000000; font-weight: bold\">(</span><span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">1</span><span style=\"color: #000000; text-decoration-color: #000000\">, </span><span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">10</span><span style=\"color: #000000; text-decoration-color: #000000; font-weight: bold\">)}</span><span style=\"color: #000000; text-decoration-color: #000000\">        </span> <span style=\"color: #e6af2e; text-decoration-color: #e6af2e\">│</span> <span style=\"color: #e6af2e; text-decoration-color: #e6af2e\">│</span> <span style=\"color: #000000; text-decoration-color: #000000\">space </span><span style=\"color: #000000; text-decoration-color: #000000; font-weight: bold\">{</span><span style=\"color: #008000; text-decoration-color: #008000\">'threshold'</span><span style=\"color: #000000; text-decoration-color: #000000\">: </span><span style=\"color: #000000; text-decoration-color: #000000; font-weight: bold\">(</span><span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">0.1</span><span style=\"color: #000000; text-decoration-color: #000000\">, </span><span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">1</span><span style=\"color: #000000; text-decoration-color: #000000; font-weight: bold\">)}</span><span style=\"color: #000000; text-decoration-color: #000000\">     </span> <span style=\"color: #e6af2e; text-decoration-color: #e6af2e\">│</span> <span style=\"color: #ff4500; text-decoration-color: #ff4500\">│</span>                                     <span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">│</span>\n",
       "<span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">│</span> <span style=\"color: #ff4500; text-decoration-color: #ff4500\">│</span> <span style=\"color: #e6af2e; text-decoration-color: #e6af2e\">╰──────────────────────────────╯</span> <span style=\"color: #e6af2e; text-decoration-color: #e6af2e\">╰────────────────────────────────────╯</span> <span style=\"color: #ff4500; text-decoration-color: #ff4500\">│</span>                                     <span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">│</span>\n",
       "<span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">│</span> <span style=\"color: #ff4500; text-decoration-color: #ff4500\">╰─────────────────────────────────────────────────────────────────────────╯</span>                                     <span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">│</span>\n",
       "<span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">│</span> <span style=\"font-weight: bold\">                                                       ↓                                                       </span> <span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">│</span>\n",
       "<span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">│</span> <span style=\"color: #777da7; text-decoration-color: #777da7\">╭─ </span><span style=\"color: #777da7; text-decoration-color: #777da7; font-weight: bold\">Split</span><span style=\"color: #777da7; text-decoration-color: #777da7\">(</span><span style=\"color: #777da7; text-decoration-color: #777da7; font-style: italic\">transformers</span><span style=\"color: #777da7; text-decoration-color: #777da7\">) ─────────────────────────────────────────────────────────────────────────────────╮</span>       <span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">│</span>\n",
       "<span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">│</span> <span style=\"color: #777da7; text-decoration-color: #777da7\">│</span> <span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">╭─ </span><span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f; font-weight: bold\">Sequential</span><span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">(</span><span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f; font-style: italic\">passthrough</span><span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">) ─╮</span> <span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">╭─ </span><span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f; font-weight: bold\">Sequential</span><span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">(</span><span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f; font-style: italic\">polynomial</span><span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">) ────────────────╮</span> <span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">╭─ </span><span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f; font-weight: bold\">Sequential</span><span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">(</span><span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f; font-style: italic\">zerocount</span><span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">) ─╮</span> <span style=\"color: #777da7; text-decoration-color: #777da7\">│</span>       <span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">│</span>\n",
       "<span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">│</span> <span style=\"color: #777da7; text-decoration-color: #777da7\">│</span> <span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">│</span> <span style=\"color: #56351e; text-decoration-color: #56351e\">╭─ </span><span style=\"color: #56351e; text-decoration-color: #56351e; font-weight: bold\">Fixed</span><span style=\"color: #56351e; text-decoration-color: #56351e\">(</span><span style=\"color: #56351e; text-decoration-color: #56351e; font-style: italic\">Passthrough</span><span style=\"color: #56351e; text-decoration-color: #56351e\">) ─╮</span>  <span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">│</span> <span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">│</span> <span style=\"color: #e6af2e; text-decoration-color: #e6af2e\">╭─ </span><span style=\"color: #e6af2e; text-decoration-color: #e6af2e; font-weight: bold\">Component</span><span style=\"color: #e6af2e; text-decoration-color: #e6af2e\">(</span><span style=\"color: #e6af2e; text-decoration-color: #e6af2e; font-style: italic\">PolynomialFeatures</span><span style=\"color: #e6af2e; text-decoration-color: #e6af2e\">) ─────╮</span> <span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">│</span> <span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">│</span> <span style=\"color: #56351e; text-decoration-color: #56351e\">╭─ </span><span style=\"color: #56351e; text-decoration-color: #56351e; font-weight: bold\">Fixed</span><span style=\"color: #56351e; text-decoration-color: #56351e\">(</span><span style=\"color: #56351e; text-decoration-color: #56351e; font-style: italic\">ZeroCount</span><span style=\"color: #56351e; text-decoration-color: #56351e\">) ─╮</span>  <span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">│</span> <span style=\"color: #777da7; text-decoration-color: #777da7\">│</span>       <span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">│</span>\n",
       "<span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">│</span> <span style=\"color: #777da7; text-decoration-color: #777da7\">│</span> <span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">│</span> <span style=\"color: #56351e; text-decoration-color: #56351e\">│</span> <span style=\"color: #000000; text-decoration-color: #000000\">item </span><span style=\"color: #800080; text-decoration-color: #800080; font-weight: bold\">Passthrough</span><span style=\"color: #000000; text-decoration-color: #000000; font-weight: bold\">()</span>   <span style=\"color: #56351e; text-decoration-color: #56351e\">│</span>  <span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">│</span> <span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">│</span> <span style=\"color: #e6af2e; text-decoration-color: #e6af2e\">│</span> <span style=\"color: #000000; text-decoration-color: #000000\">item  </span><span style=\"color: #00ffff; text-decoration-color: #00ffff; font-style: italic\">class </span><a href=\"https://www.scikit-learn.org/stable/modules/generated/sklearn.preprocessing.PolynomialFeatures.html\" target=\"_blank\"><span style=\"color: #000000; text-decoration-color: #000000; text-decoration: underline\">PolynomialFeatures</span></a><span style=\"color: #000000; text-decoration-color: #000000; font-weight: bold\">(</span><span style=\"color: #808000; text-decoration-color: #808000\">...</span><span style=\"color: #000000; text-decoration-color: #000000; font-weight: bold\">)</span> <span style=\"color: #e6af2e; text-decoration-color: #e6af2e\">│</span> <span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">│</span> <span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">│</span> <span style=\"color: #56351e; text-decoration-color: #56351e\">│</span> <span style=\"color: #000000; text-decoration-color: #000000\">item </span><span style=\"color: #800080; text-decoration-color: #800080; font-weight: bold\">ZeroCount</span><span style=\"color: #000000; text-decoration-color: #000000; font-weight: bold\">()</span>   <span style=\"color: #56351e; text-decoration-color: #56351e\">│</span>  <span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">│</span> <span style=\"color: #777da7; text-decoration-color: #777da7\">│</span>       <span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">│</span>\n",
       "<span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">│</span> <span style=\"color: #777da7; text-decoration-color: #777da7\">│</span> <span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">│</span> <span style=\"color: #56351e; text-decoration-color: #56351e\">╰──────────────────────╯</span>  <span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">│</span> <span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">│</span> <span style=\"color: #e6af2e; text-decoration-color: #e6af2e\">│</span> <span style=\"color: #000000; text-decoration-color: #000000\">space </span><span style=\"color: #000000; text-decoration-color: #000000; font-weight: bold\">{</span><span style=\"color: #008000; text-decoration-color: #008000\">'degree'</span><span style=\"color: #000000; text-decoration-color: #000000\">: </span><span style=\"color: #000000; text-decoration-color: #000000; font-weight: bold\">[</span><span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">2</span><span style=\"color: #000000; text-decoration-color: #000000\">, </span><span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">3</span><span style=\"color: #000000; text-decoration-color: #000000; font-weight: bold\">]}</span><span style=\"color: #000000; text-decoration-color: #000000\">           </span> <span style=\"color: #e6af2e; text-decoration-color: #e6af2e\">│</span> <span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">│</span> <span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">│</span> <span style=\"color: #56351e; text-decoration-color: #56351e\">╰────────────────────╯</span>  <span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">│</span> <span style=\"color: #777da7; text-decoration-color: #777da7\">│</span>       <span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">│</span>\n",
       "<span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">│</span> <span style=\"color: #777da7; text-decoration-color: #777da7\">│</span> <span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">╰───────────────────────────╯</span> <span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">│</span> <span style=\"color: #e6af2e; text-decoration-color: #e6af2e\">╰─────────────────────────────────────╯</span> <span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">│</span> <span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">╰─────────────────────────╯</span> <span style=\"color: #777da7; text-decoration-color: #777da7\">│</span>       <span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">│</span>\n",
       "<span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">│</span> <span style=\"color: #777da7; text-decoration-color: #777da7\">│</span>                               <span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">╰─────────────────────────────────────────╯</span>                             <span style=\"color: #777da7; text-decoration-color: #777da7\">│</span>       <span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">│</span>\n",
       "<span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">│</span> <span style=\"color: #777da7; text-decoration-color: #777da7\">╰───────────────────────────────────────────────────────────────────────────────────────────────────────╯</span>       <span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">│</span>\n",
       "<span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">│</span> <span style=\"font-weight: bold\">                                                       ↓                                                       </span> <span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">│</span>\n",
       "<span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">│</span> <span style=\"color: #ff4500; text-decoration-color: #ff4500\">╭─ </span><span style=\"color: #ff4500; text-decoration-color: #ff4500; font-weight: bold\">Choice</span><span style=\"color: #ff4500; text-decoration-color: #ff4500\">(</span><span style=\"color: #ff4500; text-decoration-color: #ff4500; font-style: italic\">estimator</span><span style=\"color: #ff4500; text-decoration-color: #ff4500\">) ─────────────────────────────────────────────────────────────────────────────────────────╮</span> <span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">│</span>\n",
       "<span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">│</span> <span style=\"color: #ff4500; text-decoration-color: #ff4500\">│</span> <span style=\"color: #e6af2e; text-decoration-color: #e6af2e\">╭─ </span><span style=\"color: #e6af2e; text-decoration-color: #e6af2e; font-weight: bold\">Component</span><span style=\"color: #e6af2e; text-decoration-color: #e6af2e\">(</span><span style=\"color: #e6af2e; text-decoration-color: #e6af2e; font-style: italic\">RandomForestClassifier</span><span style=\"color: #e6af2e; text-decoration-color: #e6af2e\">) ──────────╮</span> <span style=\"color: #e6af2e; text-decoration-color: #e6af2e\">╭─ </span><span style=\"color: #e6af2e; text-decoration-color: #e6af2e; font-weight: bold\">Component</span><span style=\"color: #e6af2e; text-decoration-color: #e6af2e\">(</span><span style=\"color: #e6af2e; text-decoration-color: #e6af2e; font-style: italic\">SVC</span><span style=\"color: #e6af2e; text-decoration-color: #e6af2e\">) ────────────────────────────╮</span>            <span style=\"color: #ff4500; text-decoration-color: #ff4500\">│</span> <span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">│</span>\n",
       "<span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">│</span> <span style=\"color: #ff4500; text-decoration-color: #ff4500\">│</span> <span style=\"color: #e6af2e; text-decoration-color: #e6af2e\">│</span> <span style=\"color: #000000; text-decoration-color: #000000\">item   </span><span style=\"color: #00ffff; text-decoration-color: #00ffff; font-style: italic\">class </span><a href=\"https://www.scikit-learn.org/stable/modules/generated/sklearn.ensemble.RandomForestClassifier.html\" target=\"_blank\"><span style=\"color: #000000; text-decoration-color: #000000; text-decoration: underline\">RandomForestClassifier</span></a><span style=\"color: #000000; text-decoration-color: #000000; font-weight: bold\">(</span><span style=\"color: #808000; text-decoration-color: #808000\">...</span><span style=\"color: #000000; text-decoration-color: #000000; font-weight: bold\">)</span><span style=\"color: #000000; text-decoration-color: #000000\">    </span> <span style=\"color: #e6af2e; text-decoration-color: #e6af2e\">│</span> <span style=\"color: #e6af2e; text-decoration-color: #e6af2e\">│</span> <span style=\"color: #000000; text-decoration-color: #000000\">item  </span><span style=\"color: #00ffff; text-decoration-color: #00ffff; font-style: italic\">class </span><a href=\"https://www.scikit-learn.org/stable/modules/generated/sklearn.svm.SVC.html\" target=\"_blank\"><span style=\"color: #000000; text-decoration-color: #000000; text-decoration: underline\">SVC</span></a><span style=\"color: #000000; text-decoration-color: #000000; font-weight: bold\">(</span><span style=\"color: #808000; text-decoration-color: #808000\">...</span><span style=\"color: #000000; text-decoration-color: #000000; font-weight: bold\">)</span><span style=\"color: #000000; text-decoration-color: #000000\">                       </span> <span style=\"color: #e6af2e; text-decoration-color: #e6af2e\">│</span>            <span style=\"color: #ff4500; text-decoration-color: #ff4500\">│</span> <span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">│</span>\n",
       "<span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">│</span> <span style=\"color: #ff4500; text-decoration-color: #ff4500\">│</span> <span style=\"color: #e6af2e; text-decoration-color: #e6af2e\">│</span> <span style=\"color: #000000; text-decoration-color: #000000\">config </span><span style=\"color: #000000; text-decoration-color: #000000; font-weight: bold\">{</span><span style=\"color: #008000; text-decoration-color: #008000\">'max_depth'</span><span style=\"color: #000000; text-decoration-color: #000000\">: </span><span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">3</span><span style=\"color: #000000; text-decoration-color: #000000; font-weight: bold\">}</span><span style=\"color: #000000; text-decoration-color: #000000\">                     </span> <span style=\"color: #e6af2e; text-decoration-color: #e6af2e\">│</span> <span style=\"color: #e6af2e; text-decoration-color: #e6af2e\">│</span> <span style=\"color: #000000; text-decoration-color: #000000\">space </span><span style=\"color: #000000; text-decoration-color: #000000; font-weight: bold\">{</span><span style=\"color: #008000; text-decoration-color: #008000\">'kernel'</span><span style=\"color: #000000; text-decoration-color: #000000\">: </span><span style=\"color: #000000; text-decoration-color: #000000; font-weight: bold\">[</span><span style=\"color: #008000; text-decoration-color: #008000\">'linear'</span><span style=\"color: #000000; text-decoration-color: #000000\">, </span><span style=\"color: #008000; text-decoration-color: #008000\">'rbf'</span><span style=\"color: #000000; text-decoration-color: #000000\">, </span><span style=\"color: #008000; text-decoration-color: #008000\">'poly'</span><span style=\"color: #000000; text-decoration-color: #000000; font-weight: bold\">]}</span> <span style=\"color: #e6af2e; text-decoration-color: #e6af2e\">│</span>            <span style=\"color: #ff4500; text-decoration-color: #ff4500\">│</span> <span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">│</span>\n",
       "<span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">│</span> <span style=\"color: #ff4500; text-decoration-color: #ff4500\">│</span> <span style=\"color: #e6af2e; text-decoration-color: #e6af2e\">│</span> <span style=\"color: #000000; text-decoration-color: #000000\">space  </span><span style=\"color: #000000; text-decoration-color: #000000; font-weight: bold\">{</span><span style=\"color: #000000; text-decoration-color: #000000\">                                    </span> <span style=\"color: #e6af2e; text-decoration-color: #e6af2e\">│</span> <span style=\"color: #e6af2e; text-decoration-color: #e6af2e\">╰─────────────────────────────────────────────╯</span>            <span style=\"color: #ff4500; text-decoration-color: #ff4500\">│</span> <span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">│</span>\n",
       "<span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">│</span> <span style=\"color: #ff4500; text-decoration-color: #ff4500\">│</span> <span style=\"color: #e6af2e; text-decoration-color: #e6af2e\">│</span> <span style=\"color: #000000; text-decoration-color: #000000\">           </span><span style=\"color: #008000; text-decoration-color: #008000\">'n_estimators'</span><span style=\"color: #000000; text-decoration-color: #000000\">: </span><span style=\"color: #000000; text-decoration-color: #000000; font-weight: bold\">(</span><span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">10</span><span style=\"color: #000000; text-decoration-color: #000000\">, </span><span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">100</span><span style=\"color: #000000; text-decoration-color: #000000; font-weight: bold\">)</span><span style=\"color: #000000; text-decoration-color: #000000\">,       </span> <span style=\"color: #e6af2e; text-decoration-color: #e6af2e\">│</span>                                                            <span style=\"color: #ff4500; text-decoration-color: #ff4500\">│</span> <span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">│</span>\n",
       "<span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">│</span> <span style=\"color: #ff4500; text-decoration-color: #ff4500\">│</span> <span style=\"color: #e6af2e; text-decoration-color: #e6af2e\">│</span> <span style=\"color: #000000; text-decoration-color: #000000\">           </span><span style=\"color: #008000; text-decoration-color: #008000\">'criterion'</span><span style=\"color: #000000; text-decoration-color: #000000\">: </span><span style=\"color: #000000; text-decoration-color: #000000; font-weight: bold\">[</span><span style=\"color: #000000; text-decoration-color: #000000\">                   </span> <span style=\"color: #e6af2e; text-decoration-color: #e6af2e\">│</span>                                                            <span style=\"color: #ff4500; text-decoration-color: #ff4500\">│</span> <span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">│</span>\n",
       "<span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">│</span> <span style=\"color: #ff4500; text-decoration-color: #ff4500\">│</span> <span style=\"color: #e6af2e; text-decoration-color: #e6af2e\">│</span> <span style=\"color: #000000; text-decoration-color: #000000\">               </span><span style=\"color: #008000; text-decoration-color: #008000\">'gini'</span><span style=\"color: #000000; text-decoration-color: #000000\">,                      </span> <span style=\"color: #e6af2e; text-decoration-color: #e6af2e\">│</span>                                                            <span style=\"color: #ff4500; text-decoration-color: #ff4500\">│</span> <span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">│</span>\n",
       "<span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">│</span> <span style=\"color: #ff4500; text-decoration-color: #ff4500\">│</span> <span style=\"color: #e6af2e; text-decoration-color: #e6af2e\">│</span> <span style=\"color: #000000; text-decoration-color: #000000\">               </span><span style=\"color: #008000; text-decoration-color: #008000\">'log_loss'</span><span style=\"color: #000000; text-decoration-color: #000000\">                   </span> <span style=\"color: #e6af2e; text-decoration-color: #e6af2e\">│</span>                                                            <span style=\"color: #ff4500; text-decoration-color: #ff4500\">│</span> <span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">│</span>\n",
       "<span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">│</span> <span style=\"color: #ff4500; text-decoration-color: #ff4500\">│</span> <span style=\"color: #e6af2e; text-decoration-color: #e6af2e\">│</span> <span style=\"color: #000000; text-decoration-color: #000000\">           </span><span style=\"color: #000000; text-decoration-color: #000000; font-weight: bold\">]</span><span style=\"color: #000000; text-decoration-color: #000000\">                                </span> <span style=\"color: #e6af2e; text-decoration-color: #e6af2e\">│</span>                                                            <span style=\"color: #ff4500; text-decoration-color: #ff4500\">│</span> <span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">│</span>\n",
       "<span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">│</span> <span style=\"color: #ff4500; text-decoration-color: #ff4500\">│</span> <span style=\"color: #e6af2e; text-decoration-color: #e6af2e\">│</span> <span style=\"color: #000000; text-decoration-color: #000000\">       </span><span style=\"color: #000000; text-decoration-color: #000000; font-weight: bold\">}</span><span style=\"color: #000000; text-decoration-color: #000000\">                                    </span> <span style=\"color: #e6af2e; text-decoration-color: #e6af2e\">│</span>                                                            <span style=\"color: #ff4500; text-decoration-color: #ff4500\">│</span> <span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">│</span>\n",
       "<span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">│</span> <span style=\"color: #ff4500; text-decoration-color: #ff4500\">│</span> <span style=\"color: #e6af2e; text-decoration-color: #e6af2e\">╰──────────────────────────────────────────────╯</span>                                                            <span style=\"color: #ff4500; text-decoration-color: #ff4500\">│</span> <span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">│</span>\n",
       "<span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">│</span> <span style=\"color: #ff4500; text-decoration-color: #ff4500\">╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────╯</span> <span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">│</span>\n",
       "<span style=\"color: #7e6b8f; text-decoration-color: #7e6b8f\">╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯</span>\n",
       "</pre>\n"
      ],
      "text/plain": [
       "\u001b[38;2;126;107;143m╭─\u001b[0m\u001b[38;2;126;107;143m \u001b[0m\u001b[1;38;2;126;107;143mSequential\u001b[0m\u001b[38;2;126;107;143m(\u001b[0m\u001b[3;38;2;126;107;143mmy_pipeline\u001b[0m\u001b[38;2;126;107;143m) \u001b[0m\u001b[38;2;126;107;143m──────────────────────────────────────────────────────────────────────────────────────\u001b[0m\u001b[38;2;126;107;143m─╮\u001b[0m\n",
       "\u001b[38;2;126;107;143m│\u001b[0m \u001b[38;2;119;125;167m╭─\u001b[0m\u001b[38;2;119;125;167m \u001b[0m\u001b[1;38;2;119;125;167mSplit\u001b[0m\u001b[38;2;119;125;167m(\u001b[0m\u001b[3;38;2;119;125;167msplit_imputation\u001b[0m\u001b[38;2;119;125;167m) \u001b[0m\u001b[38;2;119;125;167m──────────────────────────────────────────────────────────────────────────────────\u001b[0m\u001b[38;2;119;125;167m─╮\u001b[0m \u001b[38;2;126;107;143m│\u001b[0m\n",
       "\u001b[38;2;126;107;143m│\u001b[0m \u001b[38;2;119;125;167m│\u001b[0m \u001b[38;2;126;107;143m╭─\u001b[0m\u001b[38;2;126;107;143m \u001b[0m\u001b[1;38;2;126;107;143mSequential\u001b[0m\u001b[38;2;126;107;143m(\u001b[0m\u001b[3;38;2;126;107;143mcategories\u001b[0m\u001b[38;2;126;107;143m) \u001b[0m\u001b[38;2;126;107;143m────────────────────────\u001b[0m\u001b[38;2;126;107;143m─╮\u001b[0m \u001b[38;2;126;107;143m╭─\u001b[0m\u001b[38;2;126;107;143m \u001b[0m\u001b[1;38;2;126;107;143mSequential\u001b[0m\u001b[38;2;126;107;143m(\u001b[0m\u001b[3;38;2;126;107;143mnumerics\u001b[0m\u001b[38;2;126;107;143m) \u001b[0m\u001b[38;2;126;107;143m────────────────────────────\u001b[0m\u001b[38;2;126;107;143m─╮\u001b[0m \u001b[38;2;119;125;167m│\u001b[0m \u001b[38;2;126;107;143m│\u001b[0m\n",
       "\u001b[38;2;126;107;143m│\u001b[0m \u001b[38;2;119;125;167m│\u001b[0m \u001b[38;2;126;107;143m│\u001b[0m \u001b[38;2;86;53;30m╭─\u001b[0m\u001b[38;2;86;53;30m \u001b[0m\u001b[1;38;2;86;53;30mFixed\u001b[0m\u001b[38;2;86;53;30m(\u001b[0m\u001b[3;38;2;86;53;30mColumnTransformer\u001b[0m\u001b[38;2;86;53;30m) \u001b[0m\u001b[38;2;86;53;30m──────────────────\u001b[0m\u001b[38;2;86;53;30m─╮\u001b[0m \u001b[38;2;126;107;143m│\u001b[0m \u001b[38;2;126;107;143m│\u001b[0m \u001b[38;2;86;53;30m╭─\u001b[0m\u001b[38;2;86;53;30m \u001b[0m\u001b[1;38;2;86;53;30mFixed\u001b[0m\u001b[38;2;86;53;30m(\u001b[0m\u001b[3;38;2;86;53;30mColumnTransformer\u001b[0m\u001b[38;2;86;53;30m) \u001b[0m\u001b[38;2;86;53;30m────────────────────\u001b[0m\u001b[38;2;86;53;30m─╮\u001b[0m \u001b[38;2;126;107;143m│\u001b[0m \u001b[38;2;119;125;167m│\u001b[0m \u001b[38;2;126;107;143m│\u001b[0m\n",
       "\u001b[38;2;126;107;143m│\u001b[0m \u001b[38;2;119;125;167m│\u001b[0m \u001b[38;2;126;107;143m│\u001b[0m \u001b[38;2;86;53;30m│\u001b[0m \u001b[39mitem\u001b[0m\u001b[39m \u001b[0m\u001b[1;35mColumnTransformer\u001b[0m\u001b[1;39m(\u001b[0m\u001b[33mtransformers\u001b[0m\u001b[39m=\u001b[0m\u001b[1;39m[\u001b[0m\u001b[1;39m(\u001b[0m\u001b[32m'pass…\u001b[0m \u001b[38;2;86;53;30m│\u001b[0m \u001b[38;2;126;107;143m│\u001b[0m \u001b[38;2;126;107;143m│\u001b[0m \u001b[38;2;86;53;30m│\u001b[0m \u001b[39mitem\u001b[0m\u001b[39m \u001b[0m\u001b[1;35mColumnTransformer\u001b[0m\u001b[1;39m(\u001b[0m\u001b[33mtransformers\u001b[0m\u001b[39m=\u001b[0m\u001b[1;39m[\u001b[0m\u001b[1;39m(\u001b[0m\u001b[32m'passth…\u001b[0m \u001b[38;2;86;53;30m│\u001b[0m \u001b[38;2;126;107;143m│\u001b[0m \u001b[38;2;119;125;167m│\u001b[0m \u001b[38;2;126;107;143m│\u001b[0m\n",
       "\u001b[38;2;126;107;143m│\u001b[0m \u001b[38;2;119;125;167m│\u001b[0m \u001b[38;2;126;107;143m│\u001b[0m \u001b[38;2;86;53;30m│\u001b[0m \u001b[39m     \u001b[0m\u001b[32m'passthrough'\u001b[0m\u001b[39m,                         \u001b[0m \u001b[38;2;86;53;30m│\u001b[0m \u001b[38;2;126;107;143m│\u001b[0m \u001b[38;2;126;107;143m│\u001b[0m \u001b[38;2;86;53;30m│\u001b[0m \u001b[39m     \u001b[0m\u001b[32m'passthrough'\u001b[0m\u001b[39m,                           \u001b[0m \u001b[38;2;86;53;30m│\u001b[0m \u001b[38;2;126;107;143m│\u001b[0m \u001b[38;2;119;125;167m│\u001b[0m \u001b[38;2;126;107;143m│\u001b[0m\n",
       "\u001b[38;2;126;107;143m│\u001b[0m \u001b[38;2;119;125;167m│\u001b[0m \u001b[38;2;126;107;143m│\u001b[0m \u001b[38;2;86;53;30m│\u001b[0m \u001b[39m     \u001b[0m\u001b[39m                                 \u001b[0m\u001b[1;39m<\u001b[0m\u001b[1;95mskle…\u001b[0m \u001b[38;2;86;53;30m│\u001b[0m \u001b[38;2;126;107;143m│\u001b[0m \u001b[38;2;126;107;143m│\u001b[0m \u001b[38;2;86;53;30m│\u001b[0m \u001b[39m     \u001b[0m\u001b[39m                                 \u001b[0m\u001b[1;39m<\u001b[0m\u001b[1;95msklear…\u001b[0m \u001b[38;2;86;53;30m│\u001b[0m \u001b[38;2;126;107;143m│\u001b[0m \u001b[38;2;119;125;167m│\u001b[0m \u001b[38;2;126;107;143m│\u001b[0m\n",
       "\u001b[38;2;126;107;143m│\u001b[0m \u001b[38;2;119;125;167m│\u001b[0m \u001b[38;2;126;107;143m│\u001b[0m \u001b[38;2;86;53;30m│\u001b[0m \u001b[39m     \u001b[0m\u001b[39mobject at \u001b[0m\u001b[1;36m0x7d354d946290\u001b[0m\u001b[1;39m>\u001b[0m\u001b[1;39m)\u001b[0m\u001b[1;39m]\u001b[0m\u001b[1;39m)\u001b[0m\u001b[39m           \u001b[0m \u001b[38;2;86;53;30m│\u001b[0m \u001b[38;2;126;107;143m│\u001b[0m \u001b[38;2;126;107;143m│\u001b[0m \u001b[38;2;86;53;30m│\u001b[0m \u001b[39m     \u001b[0m\u001b[39mobject at \u001b[0m\u001b[1;36m0x7d34edf94fa0\u001b[0m\u001b[1;39m>\u001b[0m\u001b[1;39m)\u001b[0m\u001b[1;39m]\u001b[0m\u001b[1;39m)\u001b[0m\u001b[39m             \u001b[0m \u001b[38;2;86;53;30m│\u001b[0m \u001b[38;2;126;107;143m│\u001b[0m \u001b[38;2;119;125;167m│\u001b[0m \u001b[38;2;126;107;143m│\u001b[0m\n",
       "\u001b[38;2;126;107;143m│\u001b[0m \u001b[38;2;119;125;167m│\u001b[0m \u001b[38;2;126;107;143m│\u001b[0m \u001b[38;2;86;53;30m╰──────────────────────────────────────────────╯\u001b[0m \u001b[38;2;126;107;143m│\u001b[0m \u001b[38;2;126;107;143m│\u001b[0m \u001b[38;2;86;53;30m╰────────────────────────────────────────────────╯\u001b[0m \u001b[38;2;126;107;143m│\u001b[0m \u001b[38;2;119;125;167m│\u001b[0m \u001b[38;2;126;107;143m│\u001b[0m\n",
       "\u001b[38;2;126;107;143m│\u001b[0m \u001b[38;2;119;125;167m│\u001b[0m \u001b[38;2;126;107;143m│\u001b[0m \u001b[1m                       ↓                        \u001b[0m \u001b[38;2;126;107;143m│\u001b[0m \u001b[38;2;126;107;143m│\u001b[0m \u001b[1m                        ↓                         \u001b[0m \u001b[38;2;126;107;143m│\u001b[0m \u001b[38;2;119;125;167m│\u001b[0m \u001b[38;2;126;107;143m│\u001b[0m\n",
       "\u001b[38;2;126;107;143m│\u001b[0m \u001b[38;2;119;125;167m│\u001b[0m \u001b[38;2;126;107;143m│\u001b[0m \u001b[38;2;86;53;30m╭─\u001b[0m\u001b[38;2;86;53;30m \u001b[0m\u001b[1;38;2;86;53;30mFixed\u001b[0m\u001b[38;2;86;53;30m(\u001b[0m\u001b[3;38;2;86;53;30mSimpleImputer\u001b[0m\u001b[38;2;86;53;30m) \u001b[0m\u001b[38;2;86;53;30m──────────────────────\u001b[0m\u001b[38;2;86;53;30m─╮\u001b[0m \u001b[38;2;126;107;143m│\u001b[0m \u001b[38;2;126;107;143m│\u001b[0m \u001b[38;2;230;175;46m╭─\u001b[0m\u001b[38;2;230;175;46m \u001b[0m\u001b[1;38;2;230;175;46mComponent\u001b[0m\u001b[38;2;230;175;46m(\u001b[0m\u001b[3;38;2;230;175;46mSimpleImputer\u001b[0m\u001b[38;2;230;175;46m) \u001b[0m\u001b[38;2;230;175;46m────────────\u001b[0m\u001b[38;2;230;175;46m─╮\u001b[0m         \u001b[38;2;126;107;143m│\u001b[0m \u001b[38;2;119;125;167m│\u001b[0m \u001b[38;2;126;107;143m│\u001b[0m\n",
       "\u001b[38;2;126;107;143m│\u001b[0m \u001b[38;2;119;125;167m│\u001b[0m \u001b[38;2;126;107;143m│\u001b[0m \u001b[38;2;86;53;30m│\u001b[0m \u001b[39mitem\u001b[0m\u001b[39m \u001b[0m\u001b[1;35mSimpleImputer\u001b[0m\u001b[1;39m(\u001b[0m\u001b[33mfill_value\u001b[0m\u001b[39m=\u001b[0m\u001b[32m'missing'\u001b[0m\u001b[39m,    \u001b[0m \u001b[38;2;86;53;30m│\u001b[0m \u001b[38;2;126;107;143m│\u001b[0m \u001b[38;2;126;107;143m│\u001b[0m \u001b[38;2;230;175;46m│\u001b[0m \u001b[39mitem \u001b[0m\u001b[39m \u001b[0m\u001b[3;96mclass \u001b[0m\u001b]8;id=178888;https://www.scikit-learn.org/stable/modules/generated/sklearn.impute.SimpleImputer.html\u001b\\\u001b[4;39mSimpleImputer\u001b[0m\u001b]8;;\u001b\\\u001b[1;39m(\u001b[0m\u001b[33m...\u001b[0m\u001b[1;39m)\u001b[0m\u001b[39m        \u001b[0m \u001b[38;2;230;175;46m│\u001b[0m         \u001b[38;2;126;107;143m│\u001b[0m \u001b[38;2;119;125;167m│\u001b[0m \u001b[38;2;126;107;143m│\u001b[0m\n",
       "\u001b[38;2;126;107;143m│\u001b[0m \u001b[38;2;119;125;167m│\u001b[0m \u001b[38;2;126;107;143m│\u001b[0m \u001b[38;2;86;53;30m│\u001b[0m \u001b[39m     \u001b[0m\u001b[33mstrategy\u001b[0m\u001b[39m=\u001b[0m\u001b[32m'constant'\u001b[0m\u001b[1;39m)\u001b[0m\u001b[39m                   \u001b[0m \u001b[38;2;86;53;30m│\u001b[0m \u001b[38;2;126;107;143m│\u001b[0m \u001b[38;2;126;107;143m│\u001b[0m \u001b[38;2;230;175;46m│\u001b[0m \u001b[39mspace\u001b[0m\u001b[39m \u001b[0m\u001b[1;39m{\u001b[0m\u001b[32m'strategy'\u001b[0m\u001b[39m: \u001b[0m\u001b[1;39m[\u001b[0m\u001b[32m'mean'\u001b[0m\u001b[39m, \u001b[0m\u001b[32m'median'\u001b[0m\u001b[1;39m]\u001b[0m\u001b[1;39m}\u001b[0m \u001b[38;2;230;175;46m│\u001b[0m         \u001b[38;2;126;107;143m│\u001b[0m \u001b[38;2;119;125;167m│\u001b[0m \u001b[38;2;126;107;143m│\u001b[0m\n",
       "\u001b[38;2;126;107;143m│\u001b[0m \u001b[38;2;119;125;167m│\u001b[0m \u001b[38;2;126;107;143m│\u001b[0m \u001b[38;2;86;53;30m╰──────────────────────────────────────────────╯\u001b[0m \u001b[38;2;126;107;143m│\u001b[0m \u001b[38;2;126;107;143m│\u001b[0m \u001b[38;2;230;175;46m╰────────────────────────────────────────╯\u001b[0m         \u001b[38;2;126;107;143m│\u001b[0m \u001b[38;2;119;125;167m│\u001b[0m \u001b[38;2;126;107;143m│\u001b[0m\n",
       "\u001b[38;2;126;107;143m│\u001b[0m \u001b[38;2;119;125;167m│\u001b[0m \u001b[38;2;126;107;143m│\u001b[0m \u001b[1m                       ↓                        \u001b[0m \u001b[38;2;126;107;143m│\u001b[0m \u001b[38;2;126;107;143m╰────────────────────────────────────────────────────╯\u001b[0m \u001b[38;2;119;125;167m│\u001b[0m \u001b[38;2;126;107;143m│\u001b[0m\n",
       "\u001b[38;2;126;107;143m│\u001b[0m \u001b[38;2;119;125;167m│\u001b[0m \u001b[38;2;126;107;143m│\u001b[0m \u001b[38;2;86;53;30m╭─\u001b[0m\u001b[38;2;86;53;30m \u001b[0m\u001b[1;38;2;86;53;30mFixed\u001b[0m\u001b[38;2;86;53;30m(\u001b[0m\u001b[3;38;2;86;53;30mOneHotEncoder\u001b[0m\u001b[38;2;86;53;30m) \u001b[0m\u001b[38;2;86;53;30m──────────────────────\u001b[0m\u001b[38;2;86;53;30m─╮\u001b[0m \u001b[38;2;126;107;143m│\u001b[0m                                                        \u001b[38;2;119;125;167m│\u001b[0m \u001b[38;2;126;107;143m│\u001b[0m\n",
       "\u001b[38;2;126;107;143m│\u001b[0m \u001b[38;2;119;125;167m│\u001b[0m \u001b[38;2;126;107;143m│\u001b[0m \u001b[38;2;86;53;30m│\u001b[0m \u001b[39mitem\u001b[0m\u001b[39m \u001b[0m\u001b[1;35mOneHotEncoder\u001b[0m\u001b[1;39m(\u001b[0m\u001b[33mdrop\u001b[0m\u001b[39m=\u001b[0m\u001b[32m'first'\u001b[0m\u001b[39m,            \u001b[0m \u001b[38;2;86;53;30m│\u001b[0m \u001b[38;2;126;107;143m│\u001b[0m                                                        \u001b[38;2;119;125;167m│\u001b[0m \u001b[38;2;126;107;143m│\u001b[0m\n",
       "\u001b[38;2;126;107;143m│\u001b[0m \u001b[38;2;119;125;167m│\u001b[0m \u001b[38;2;126;107;143m│\u001b[0m \u001b[38;2;86;53;30m│\u001b[0m \u001b[39m     \u001b[0m\u001b[33msparse_output\u001b[0m\u001b[39m=\u001b[0m\u001b[3;91mFalse\u001b[0m\u001b[1;39m)\u001b[0m\u001b[39m                   \u001b[0m \u001b[38;2;86;53;30m│\u001b[0m \u001b[38;2;126;107;143m│\u001b[0m                                                        \u001b[38;2;119;125;167m│\u001b[0m \u001b[38;2;126;107;143m│\u001b[0m\n",
       "\u001b[38;2;126;107;143m│\u001b[0m \u001b[38;2;119;125;167m│\u001b[0m \u001b[38;2;126;107;143m│\u001b[0m \u001b[38;2;86;53;30m╰──────────────────────────────────────────────╯\u001b[0m \u001b[38;2;126;107;143m│\u001b[0m                                                        \u001b[38;2;119;125;167m│\u001b[0m \u001b[38;2;126;107;143m│\u001b[0m\n",
       "\u001b[38;2;126;107;143m│\u001b[0m \u001b[38;2;119;125;167m│\u001b[0m \u001b[38;2;126;107;143m╰──────────────────────────────────────────────────╯\u001b[0m                                                        \u001b[38;2;119;125;167m│\u001b[0m \u001b[38;2;126;107;143m│\u001b[0m\n",
       "\u001b[38;2;126;107;143m│\u001b[0m \u001b[38;2;119;125;167m╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────╯\u001b[0m \u001b[38;2;126;107;143m│\u001b[0m\n",
       "\u001b[38;2;126;107;143m│\u001b[0m \u001b[1m                                                       ↓                                                       \u001b[0m \u001b[38;2;126;107;143m│\u001b[0m\n",
       "\u001b[38;2;126;107;143m│\u001b[0m \u001b[38;2;255;69;0m╭─\u001b[0m\u001b[38;2;255;69;0m \u001b[0m\u001b[1;38;2;255;69;0mChoice\u001b[0m\u001b[38;2;255;69;0m(\u001b[0m\u001b[3;38;2;255;69;0mselectors\u001b[0m\u001b[38;2;255;69;0m) \u001b[0m\u001b[38;2;255;69;0m────────────────────────────────────────────────────\u001b[0m\u001b[38;2;255;69;0m─╮\u001b[0m                                     \u001b[38;2;126;107;143m│\u001b[0m\n",
       "\u001b[38;2;126;107;143m│\u001b[0m \u001b[38;2;255;69;0m│\u001b[0m \u001b[38;2;230;175;46m╭─\u001b[0m\u001b[38;2;230;175;46m \u001b[0m\u001b[1;38;2;230;175;46mComponent\u001b[0m\u001b[38;2;230;175;46m(\u001b[0m\u001b[3;38;2;230;175;46mSelectKBest\u001b[0m\u001b[38;2;230;175;46m) \u001b[0m\u001b[38;2;230;175;46m────\u001b[0m\u001b[38;2;230;175;46m─╮\u001b[0m \u001b[38;2;230;175;46m╭─\u001b[0m\u001b[38;2;230;175;46m \u001b[0m\u001b[1;38;2;230;175;46mComponent\u001b[0m\u001b[38;2;230;175;46m(\u001b[0m\u001b[3;38;2;230;175;46mVarianceThreshold\u001b[0m\u001b[38;2;230;175;46m) \u001b[0m\u001b[38;2;230;175;46m────\u001b[0m\u001b[38;2;230;175;46m─╮\u001b[0m \u001b[38;2;255;69;0m│\u001b[0m                                     \u001b[38;2;126;107;143m│\u001b[0m\n",
       "\u001b[38;2;126;107;143m│\u001b[0m \u001b[38;2;255;69;0m│\u001b[0m \u001b[38;2;230;175;46m│\u001b[0m \u001b[39mitem \u001b[0m\u001b[39m \u001b[0m\u001b[3;96mclass \u001b[0m\u001b]8;id=870666;https://www.scikit-learn.org/stable/modules/generated/sklearn.feature_selection.SelectKBest.html\u001b\\\u001b[4;39mSelectKBest\u001b[0m\u001b]8;;\u001b\\\u001b[1;39m(\u001b[0m\u001b[33m...\u001b[0m\u001b[1;39m)\u001b[0m \u001b[38;2;230;175;46m│\u001b[0m \u001b[38;2;230;175;46m│\u001b[0m \u001b[39mitem \u001b[0m\u001b[39m \u001b[0m\u001b[3;96mclass \u001b[0m\u001b]8;id=23174;https://www.scikit-learn.org/stable/modules/generated/sklearn.feature_selection.VarianceThreshold.html\u001b\\\u001b[4;39mVarianceThreshold\u001b[0m\u001b]8;;\u001b\\\u001b[1;39m(\u001b[0m\u001b[33m...\u001b[0m\u001b[1;39m)\u001b[0m \u001b[38;2;230;175;46m│\u001b[0m \u001b[38;2;255;69;0m│\u001b[0m                                     \u001b[38;2;126;107;143m│\u001b[0m\n",
       "\u001b[38;2;126;107;143m│\u001b[0m \u001b[38;2;255;69;0m│\u001b[0m \u001b[38;2;230;175;46m│\u001b[0m \u001b[39mspace\u001b[0m\u001b[39m \u001b[0m\u001b[1;39m{\u001b[0m\u001b[32m'k'\u001b[0m\u001b[39m: \u001b[0m\u001b[1;39m(\u001b[0m\u001b[1;36m1\u001b[0m\u001b[39m, \u001b[0m\u001b[1;36m10\u001b[0m\u001b[1;39m)\u001b[0m\u001b[1;39m}\u001b[0m\u001b[39m        \u001b[0m \u001b[38;2;230;175;46m│\u001b[0m \u001b[38;2;230;175;46m│\u001b[0m \u001b[39mspace\u001b[0m\u001b[39m \u001b[0m\u001b[1;39m{\u001b[0m\u001b[32m'threshold'\u001b[0m\u001b[39m: \u001b[0m\u001b[1;39m(\u001b[0m\u001b[1;36m0.1\u001b[0m\u001b[39m, \u001b[0m\u001b[1;36m1\u001b[0m\u001b[1;39m)\u001b[0m\u001b[1;39m}\u001b[0m\u001b[39m     \u001b[0m \u001b[38;2;230;175;46m│\u001b[0m \u001b[38;2;255;69;0m│\u001b[0m                                     \u001b[38;2;126;107;143m│\u001b[0m\n",
       "\u001b[38;2;126;107;143m│\u001b[0m \u001b[38;2;255;69;0m│\u001b[0m \u001b[38;2;230;175;46m╰──────────────────────────────╯\u001b[0m \u001b[38;2;230;175;46m╰────────────────────────────────────╯\u001b[0m \u001b[38;2;255;69;0m│\u001b[0m                                     \u001b[38;2;126;107;143m│\u001b[0m\n",
       "\u001b[38;2;126;107;143m│\u001b[0m \u001b[38;2;255;69;0m╰─────────────────────────────────────────────────────────────────────────╯\u001b[0m                                     \u001b[38;2;126;107;143m│\u001b[0m\n",
       "\u001b[38;2;126;107;143m│\u001b[0m \u001b[1m                                                       ↓                                                       \u001b[0m \u001b[38;2;126;107;143m│\u001b[0m\n",
       "\u001b[38;2;126;107;143m│\u001b[0m \u001b[38;2;119;125;167m╭─\u001b[0m\u001b[38;2;119;125;167m \u001b[0m\u001b[1;38;2;119;125;167mSplit\u001b[0m\u001b[38;2;119;125;167m(\u001b[0m\u001b[3;38;2;119;125;167mtransformers\u001b[0m\u001b[38;2;119;125;167m) \u001b[0m\u001b[38;2;119;125;167m────────────────────────────────────────────────────────────────────────────────\u001b[0m\u001b[38;2;119;125;167m─╮\u001b[0m       \u001b[38;2;126;107;143m│\u001b[0m\n",
       "\u001b[38;2;126;107;143m│\u001b[0m \u001b[38;2;119;125;167m│\u001b[0m \u001b[38;2;126;107;143m╭─\u001b[0m\u001b[38;2;126;107;143m \u001b[0m\u001b[1;38;2;126;107;143mSequential\u001b[0m\u001b[38;2;126;107;143m(\u001b[0m\u001b[3;38;2;126;107;143mpassthrough\u001b[0m\u001b[38;2;126;107;143m) \u001b[0m\u001b[38;2;126;107;143m─╮\u001b[0m \u001b[38;2;126;107;143m╭─\u001b[0m\u001b[38;2;126;107;143m \u001b[0m\u001b[1;38;2;126;107;143mSequential\u001b[0m\u001b[38;2;126;107;143m(\u001b[0m\u001b[3;38;2;126;107;143mpolynomial\u001b[0m\u001b[38;2;126;107;143m) \u001b[0m\u001b[38;2;126;107;143m───────────────\u001b[0m\u001b[38;2;126;107;143m─╮\u001b[0m \u001b[38;2;126;107;143m╭─\u001b[0m\u001b[38;2;126;107;143m \u001b[0m\u001b[1;38;2;126;107;143mSequential\u001b[0m\u001b[38;2;126;107;143m(\u001b[0m\u001b[3;38;2;126;107;143mzerocount\u001b[0m\u001b[38;2;126;107;143m) \u001b[0m\u001b[38;2;126;107;143m─╮\u001b[0m \u001b[38;2;119;125;167m│\u001b[0m       \u001b[38;2;126;107;143m│\u001b[0m\n",
       "\u001b[38;2;126;107;143m│\u001b[0m \u001b[38;2;119;125;167m│\u001b[0m \u001b[38;2;126;107;143m│\u001b[0m \u001b[38;2;86;53;30m╭─\u001b[0m\u001b[38;2;86;53;30m \u001b[0m\u001b[1;38;2;86;53;30mFixed\u001b[0m\u001b[38;2;86;53;30m(\u001b[0m\u001b[3;38;2;86;53;30mPassthrough\u001b[0m\u001b[38;2;86;53;30m) \u001b[0m\u001b[38;2;86;53;30m─╮\u001b[0m  \u001b[38;2;126;107;143m│\u001b[0m \u001b[38;2;126;107;143m│\u001b[0m \u001b[38;2;230;175;46m╭─\u001b[0m\u001b[38;2;230;175;46m \u001b[0m\u001b[1;38;2;230;175;46mComponent\u001b[0m\u001b[38;2;230;175;46m(\u001b[0m\u001b[3;38;2;230;175;46mPolynomialFeatures\u001b[0m\u001b[38;2;230;175;46m) \u001b[0m\u001b[38;2;230;175;46m────\u001b[0m\u001b[38;2;230;175;46m─╮\u001b[0m \u001b[38;2;126;107;143m│\u001b[0m \u001b[38;2;126;107;143m│\u001b[0m \u001b[38;2;86;53;30m╭─\u001b[0m\u001b[38;2;86;53;30m \u001b[0m\u001b[1;38;2;86;53;30mFixed\u001b[0m\u001b[38;2;86;53;30m(\u001b[0m\u001b[3;38;2;86;53;30mZeroCount\u001b[0m\u001b[38;2;86;53;30m) \u001b[0m\u001b[38;2;86;53;30m─╮\u001b[0m  \u001b[38;2;126;107;143m│\u001b[0m \u001b[38;2;119;125;167m│\u001b[0m       \u001b[38;2;126;107;143m│\u001b[0m\n",
       "\u001b[38;2;126;107;143m│\u001b[0m \u001b[38;2;119;125;167m│\u001b[0m \u001b[38;2;126;107;143m│\u001b[0m \u001b[38;2;86;53;30m│\u001b[0m \u001b[39mitem\u001b[0m\u001b[39m \u001b[0m\u001b[1;35mPassthrough\u001b[0m\u001b[1;39m(\u001b[0m\u001b[1;39m)\u001b[0m   \u001b[38;2;86;53;30m│\u001b[0m  \u001b[38;2;126;107;143m│\u001b[0m \u001b[38;2;126;107;143m│\u001b[0m \u001b[38;2;230;175;46m│\u001b[0m \u001b[39mitem \u001b[0m\u001b[39m \u001b[0m\u001b[3;96mclass \u001b[0m\u001b]8;id=605509;https://www.scikit-learn.org/stable/modules/generated/sklearn.preprocessing.PolynomialFeatures.html\u001b\\\u001b[4;39mPolynomialFeatures\u001b[0m\u001b]8;;\u001b\\\u001b[1;39m(\u001b[0m\u001b[33m...\u001b[0m\u001b[1;39m)\u001b[0m \u001b[38;2;230;175;46m│\u001b[0m \u001b[38;2;126;107;143m│\u001b[0m \u001b[38;2;126;107;143m│\u001b[0m \u001b[38;2;86;53;30m│\u001b[0m \u001b[39mitem\u001b[0m\u001b[39m \u001b[0m\u001b[1;35mZeroCount\u001b[0m\u001b[1;39m(\u001b[0m\u001b[1;39m)\u001b[0m   \u001b[38;2;86;53;30m│\u001b[0m  \u001b[38;2;126;107;143m│\u001b[0m \u001b[38;2;119;125;167m│\u001b[0m       \u001b[38;2;126;107;143m│\u001b[0m\n",
       "\u001b[38;2;126;107;143m│\u001b[0m \u001b[38;2;119;125;167m│\u001b[0m \u001b[38;2;126;107;143m│\u001b[0m \u001b[38;2;86;53;30m╰──────────────────────╯\u001b[0m  \u001b[38;2;126;107;143m│\u001b[0m \u001b[38;2;126;107;143m│\u001b[0m \u001b[38;2;230;175;46m│\u001b[0m \u001b[39mspace\u001b[0m\u001b[39m \u001b[0m\u001b[1;39m{\u001b[0m\u001b[32m'degree'\u001b[0m\u001b[39m: \u001b[0m\u001b[1;39m[\u001b[0m\u001b[1;36m2\u001b[0m\u001b[39m, \u001b[0m\u001b[1;36m3\u001b[0m\u001b[1;39m]\u001b[0m\u001b[1;39m}\u001b[0m\u001b[39m           \u001b[0m \u001b[38;2;230;175;46m│\u001b[0m \u001b[38;2;126;107;143m│\u001b[0m \u001b[38;2;126;107;143m│\u001b[0m \u001b[38;2;86;53;30m╰────────────────────╯\u001b[0m  \u001b[38;2;126;107;143m│\u001b[0m \u001b[38;2;119;125;167m│\u001b[0m       \u001b[38;2;126;107;143m│\u001b[0m\n",
       "\u001b[38;2;126;107;143m│\u001b[0m \u001b[38;2;119;125;167m│\u001b[0m \u001b[38;2;126;107;143m╰───────────────────────────╯\u001b[0m \u001b[38;2;126;107;143m│\u001b[0m \u001b[38;2;230;175;46m╰─────────────────────────────────────╯\u001b[0m \u001b[38;2;126;107;143m│\u001b[0m \u001b[38;2;126;107;143m╰─────────────────────────╯\u001b[0m \u001b[38;2;119;125;167m│\u001b[0m       \u001b[38;2;126;107;143m│\u001b[0m\n",
       "\u001b[38;2;126;107;143m│\u001b[0m \u001b[38;2;119;125;167m│\u001b[0m                               \u001b[38;2;126;107;143m╰─────────────────────────────────────────╯\u001b[0m                             \u001b[38;2;119;125;167m│\u001b[0m       \u001b[38;2;126;107;143m│\u001b[0m\n",
       "\u001b[38;2;126;107;143m│\u001b[0m \u001b[38;2;119;125;167m╰───────────────────────────────────────────────────────────────────────────────────────────────────────╯\u001b[0m       \u001b[38;2;126;107;143m│\u001b[0m\n",
       "\u001b[38;2;126;107;143m│\u001b[0m \u001b[1m                                                       ↓                                                       \u001b[0m \u001b[38;2;126;107;143m│\u001b[0m\n",
       "\u001b[38;2;126;107;143m│\u001b[0m \u001b[38;2;255;69;0m╭─\u001b[0m\u001b[38;2;255;69;0m \u001b[0m\u001b[1;38;2;255;69;0mChoice\u001b[0m\u001b[38;2;255;69;0m(\u001b[0m\u001b[3;38;2;255;69;0mestimator\u001b[0m\u001b[38;2;255;69;0m) \u001b[0m\u001b[38;2;255;69;0m────────────────────────────────────────────────────────────────────────────────────────\u001b[0m\u001b[38;2;255;69;0m─╮\u001b[0m \u001b[38;2;126;107;143m│\u001b[0m\n",
       "\u001b[38;2;126;107;143m│\u001b[0m \u001b[38;2;255;69;0m│\u001b[0m \u001b[38;2;230;175;46m╭─\u001b[0m\u001b[38;2;230;175;46m \u001b[0m\u001b[1;38;2;230;175;46mComponent\u001b[0m\u001b[38;2;230;175;46m(\u001b[0m\u001b[3;38;2;230;175;46mRandomForestClassifier\u001b[0m\u001b[38;2;230;175;46m) \u001b[0m\u001b[38;2;230;175;46m─────────\u001b[0m\u001b[38;2;230;175;46m─╮\u001b[0m \u001b[38;2;230;175;46m╭─\u001b[0m\u001b[38;2;230;175;46m \u001b[0m\u001b[1;38;2;230;175;46mComponent\u001b[0m\u001b[38;2;230;175;46m(\u001b[0m\u001b[3;38;2;230;175;46mSVC\u001b[0m\u001b[38;2;230;175;46m) \u001b[0m\u001b[38;2;230;175;46m───────────────────────────\u001b[0m\u001b[38;2;230;175;46m─╮\u001b[0m            \u001b[38;2;255;69;0m│\u001b[0m \u001b[38;2;126;107;143m│\u001b[0m\n",
       "\u001b[38;2;126;107;143m│\u001b[0m \u001b[38;2;255;69;0m│\u001b[0m \u001b[38;2;230;175;46m│\u001b[0m \u001b[39mitem  \u001b[0m\u001b[39m \u001b[0m\u001b[3;96mclass \u001b[0m\u001b]8;id=470078;https://www.scikit-learn.org/stable/modules/generated/sklearn.ensemble.RandomForestClassifier.html\u001b\\\u001b[4;39mRandomForestClassifier\u001b[0m\u001b]8;;\u001b\\\u001b[1;39m(\u001b[0m\u001b[33m...\u001b[0m\u001b[1;39m)\u001b[0m\u001b[39m    \u001b[0m \u001b[38;2;230;175;46m│\u001b[0m \u001b[38;2;230;175;46m│\u001b[0m \u001b[39mitem \u001b[0m\u001b[39m \u001b[0m\u001b[3;96mclass \u001b[0m\u001b]8;id=315827;https://www.scikit-learn.org/stable/modules/generated/sklearn.svm.SVC.html\u001b\\\u001b[4;39mSVC\u001b[0m\u001b]8;;\u001b\\\u001b[1;39m(\u001b[0m\u001b[33m...\u001b[0m\u001b[1;39m)\u001b[0m\u001b[39m                       \u001b[0m \u001b[38;2;230;175;46m│\u001b[0m            \u001b[38;2;255;69;0m│\u001b[0m \u001b[38;2;126;107;143m│\u001b[0m\n",
       "\u001b[38;2;126;107;143m│\u001b[0m \u001b[38;2;255;69;0m│\u001b[0m \u001b[38;2;230;175;46m│\u001b[0m \u001b[39mconfig\u001b[0m\u001b[39m \u001b[0m\u001b[1;39m{\u001b[0m\u001b[32m'max_depth'\u001b[0m\u001b[39m: \u001b[0m\u001b[1;36m3\u001b[0m\u001b[1;39m}\u001b[0m\u001b[39m                     \u001b[0m \u001b[38;2;230;175;46m│\u001b[0m \u001b[38;2;230;175;46m│\u001b[0m \u001b[39mspace\u001b[0m\u001b[39m \u001b[0m\u001b[1;39m{\u001b[0m\u001b[32m'kernel'\u001b[0m\u001b[39m: \u001b[0m\u001b[1;39m[\u001b[0m\u001b[32m'linear'\u001b[0m\u001b[39m, \u001b[0m\u001b[32m'rbf'\u001b[0m\u001b[39m, \u001b[0m\u001b[32m'poly'\u001b[0m\u001b[1;39m]\u001b[0m\u001b[1;39m}\u001b[0m \u001b[38;2;230;175;46m│\u001b[0m            \u001b[38;2;255;69;0m│\u001b[0m \u001b[38;2;126;107;143m│\u001b[0m\n",
       "\u001b[38;2;126;107;143m│\u001b[0m \u001b[38;2;255;69;0m│\u001b[0m \u001b[38;2;230;175;46m│\u001b[0m \u001b[39mspace \u001b[0m\u001b[39m \u001b[0m\u001b[1;39m{\u001b[0m\u001b[39m                                    \u001b[0m \u001b[38;2;230;175;46m│\u001b[0m \u001b[38;2;230;175;46m╰─────────────────────────────────────────────╯\u001b[0m            \u001b[38;2;255;69;0m│\u001b[0m \u001b[38;2;126;107;143m│\u001b[0m\n",
       "\u001b[38;2;126;107;143m│\u001b[0m \u001b[38;2;255;69;0m│\u001b[0m \u001b[38;2;230;175;46m│\u001b[0m \u001b[39m       \u001b[0m\u001b[39m    \u001b[0m\u001b[32m'n_estimators'\u001b[0m\u001b[39m: \u001b[0m\u001b[1;39m(\u001b[0m\u001b[1;36m10\u001b[0m\u001b[39m, \u001b[0m\u001b[1;36m100\u001b[0m\u001b[1;39m)\u001b[0m\u001b[39m,       \u001b[0m \u001b[38;2;230;175;46m│\u001b[0m                                                            \u001b[38;2;255;69;0m│\u001b[0m \u001b[38;2;126;107;143m│\u001b[0m\n",
       "\u001b[38;2;126;107;143m│\u001b[0m \u001b[38;2;255;69;0m│\u001b[0m \u001b[38;2;230;175;46m│\u001b[0m \u001b[39m       \u001b[0m\u001b[39m    \u001b[0m\u001b[32m'criterion'\u001b[0m\u001b[39m: \u001b[0m\u001b[1;39m[\u001b[0m\u001b[39m                   \u001b[0m \u001b[38;2;230;175;46m│\u001b[0m                                                            \u001b[38;2;255;69;0m│\u001b[0m \u001b[38;2;126;107;143m│\u001b[0m\n",
       "\u001b[38;2;126;107;143m│\u001b[0m \u001b[38;2;255;69;0m│\u001b[0m \u001b[38;2;230;175;46m│\u001b[0m \u001b[39m       \u001b[0m\u001b[39m        \u001b[0m\u001b[32m'gini'\u001b[0m\u001b[39m,                      \u001b[0m \u001b[38;2;230;175;46m│\u001b[0m                                                            \u001b[38;2;255;69;0m│\u001b[0m \u001b[38;2;126;107;143m│\u001b[0m\n",
       "\u001b[38;2;126;107;143m│\u001b[0m \u001b[38;2;255;69;0m│\u001b[0m \u001b[38;2;230;175;46m│\u001b[0m \u001b[39m       \u001b[0m\u001b[39m        \u001b[0m\u001b[32m'log_loss'\u001b[0m\u001b[39m                   \u001b[0m \u001b[38;2;230;175;46m│\u001b[0m                                                            \u001b[38;2;255;69;0m│\u001b[0m \u001b[38;2;126;107;143m│\u001b[0m\n",
       "\u001b[38;2;126;107;143m│\u001b[0m \u001b[38;2;255;69;0m│\u001b[0m \u001b[38;2;230;175;46m│\u001b[0m \u001b[39m       \u001b[0m\u001b[39m    \u001b[0m\u001b[1;39m]\u001b[0m\u001b[39m                                \u001b[0m \u001b[38;2;230;175;46m│\u001b[0m                                                            \u001b[38;2;255;69;0m│\u001b[0m \u001b[38;2;126;107;143m│\u001b[0m\n",
       "\u001b[38;2;126;107;143m│\u001b[0m \u001b[38;2;255;69;0m│\u001b[0m \u001b[38;2;230;175;46m│\u001b[0m \u001b[39m       \u001b[0m\u001b[1;39m}\u001b[0m\u001b[39m                                    \u001b[0m \u001b[38;2;230;175;46m│\u001b[0m                                                            \u001b[38;2;255;69;0m│\u001b[0m \u001b[38;2;126;107;143m│\u001b[0m\n",
       "\u001b[38;2;126;107;143m│\u001b[0m \u001b[38;2;255;69;0m│\u001b[0m \u001b[38;2;230;175;46m╰──────────────────────────────────────────────╯\u001b[0m                                                            \u001b[38;2;255;69;0m│\u001b[0m \u001b[38;2;126;107;143m│\u001b[0m\n",
       "\u001b[38;2;126;107;143m│\u001b[0m \u001b[38;2;255;69;0m╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────╯\u001b[0m \u001b[38;2;126;107;143m│\u001b[0m\n",
       "\u001b[38;2;126;107;143m╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯\u001b[0m\n"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "text/html": [],
      "text/plain": [
       "Sequential(name='my_pipeline', item=None, nodes=(Split(name='split_imputation', item=None, nodes=(Sequential(name='categories', item=None, nodes=(Fixed(name='ColumnTransformer', item=ColumnTransformer(transformers=[('passthrough', 'passthrough',\n",
       "                                 <sklearn.compose._column_transformer.make_column_selector object at 0x7d354d946290>)]), nodes=(), config=None, space=None, fidelities=None, config_transform=None, meta=None), Fixed(name='SimpleImputer', item=SimpleImputer(fill_value='missing', strategy='constant'), nodes=(), config=None, space=None, fidelities=None, config_transform=None, meta=None), Fixed(name='OneHotEncoder', item=OneHotEncoder(drop='first', sparse_output=False), nodes=(), config=None, space=None, fidelities=None, config_transform=None, meta=None)), config=None, space=None, fidelities=None, config_transform=None, meta=None), Sequential(name='numerics', item=None, nodes=(Fixed(name='ColumnTransformer', item=ColumnTransformer(transformers=[('passthrough', 'passthrough',\n",
       "                                 <sklearn.compose._column_transformer.make_column_selector object at 0x7d34edf94fa0>)]), nodes=(), config=None, space=None, fidelities=None, config_transform=None, meta=None), Component(name='SimpleImputer', item=<class 'sklearn.impute._base.SimpleImputer'>, nodes=(), config=None, space={'strategy': ['mean', 'median']}, fidelities=None, config_transform=None, meta=None)), config=None, space=None, fidelities=None, config_transform=None, meta=None)), config=None, space=None, fidelities=None, config_transform=None, meta=None), Choice(name='selectors', item=None, nodes=(Component(name='SelectKBest', item=<class 'sklearn.feature_selection._univariate_selection.SelectKBest'>, nodes=(), config=None, space={'k': (1, 10)}, fidelities=None, config_transform=None, meta=None), Component(name='VarianceThreshold', item=<class 'sklearn.feature_selection._variance_threshold.VarianceThreshold'>, nodes=(), config=None, space={'threshold': (0.1, 1)}, fidelities=None, config_transform=None, meta=None)), config=None, space=None, fidelities=None, config_transform=None, meta=None), Split(name='transformers', item=None, nodes=(Sequential(name='passthrough', item=None, nodes=(Fixed(name='Passthrough', item=Passthrough(), nodes=(), config=None, space=None, fidelities=None, config_transform=None, meta=None),), config=None, space=None, fidelities=None, config_transform=None, meta=None), Sequential(name='polynomial', item=None, nodes=(Component(name='PolynomialFeatures', item=<class 'sklearn.preprocessing._polynomial.PolynomialFeatures'>, nodes=(), config=None, space={'degree': [2, 3]}, fidelities=None, config_transform=None, meta=None),), config=None, space=None, fidelities=None, config_transform=None, meta=None), Sequential(name='zerocount', item=None, nodes=(Fixed(name='ZeroCount', item=ZeroCount(), nodes=(), config=None, space=None, fidelities=None, config_transform=None, meta=None),), config=None, space=None, fidelities=None, config_transform=None, meta=None)), config=None, space=None, fidelities=None, config_transform=None, meta=None), Choice(name='estimator', item=None, nodes=(Component(name='RandomForestClassifier', item=<class 'sklearn.ensemble._forest.RandomForestClassifier'>, nodes=(), config={'max_depth': 3}, space={'n_estimators': (10, 100), 'criterion': ['gini', 'log_loss']}, fidelities=None, config_transform=None, meta=None), Component(name='SVC', item=<class 'sklearn.svm._classes.SVC'>, nodes=(), config=None, space={'kernel': ['linear', 'rbf', 'poly']}, fidelities=None, config_transform=None, meta=None)), config=None, space=None, fidelities=None, config_transform=None, meta=None)), config=None, space=None, fidelities=None, config_transform=None, meta=None)"
      ]
     },
     "execution_count": 2,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "from tpot.builtin_modules import Passthrough, ZeroCount\n",
    "from sklearn.preprocessing import PolynomialFeatures\n",
    "from sklearn.decomposition import PCA\n",
    "\n",
    "from sklearn.feature_selection import VarianceThreshold, SelectKBest\n",
    "\n",
    "selectors = Choice(\n",
    "    Component(VarianceThreshold, space={\"threshold\": (0.1,1)}),\n",
    "    Component(SelectKBest, space={\"k\": (1, 10)}),\n",
    "    name=\"selectors\",\n",
    ")\n",
    "\n",
    "\n",
    "transformers = Split(\n",
    "    {\n",
    "        \"passthrough\": Passthrough(),\n",
    "        \"polynomial\": Component(PolynomialFeatures, space={\"degree\": [2, 3]}),\n",
    "        \"zerocount\" : ZeroCount(),\n",
    "    },\n",
    "    # config={\"categories\": select_categories, \"numerics\": select_numerical},\n",
    "    name=\"transformers\",\n",
    ")\n",
    "\n",
    "pipeline = (\n",
    "    Sequential(name=\"my_pipeline\")\n",
    "    >> split_imputation\n",
    "    # >> Component(SimpleImputer, space={\"strategy\": [\"mean\", \"median\"]})  # Choose either mean or median\n",
    "    \n",
    "    >> selectors\n",
    "    >> transformers\n",
    "    >> Choice(\n",
    "        # Our pipeline can choose between two different estimators\n",
    "        Component(\n",
    "            RandomForestClassifier,\n",
    "            space={\"n_estimators\": (10, 100), \"criterion\": [\"gini\", \"log_loss\"]},\n",
    "            config={\"max_depth\": 3},\n",
    "        ),\n",
    "        Component(SVC, space={\"kernel\": [\"linear\", \"rbf\", \"poly\"]}),\n",
    "        name=\"estimator\",\n",
    "    )\n",
    ")\n",
    "\n",
    "# Display the amltk Pipeline\n",
    "pipeline"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<style>#sk-container-id-1 {\n",
       "  /* Definition of color scheme common for light and dark mode */\n",
       "  --sklearn-color-text: black;\n",
       "  --sklearn-color-line: gray;\n",
       "  /* Definition of color scheme for unfitted estimators */\n",
       "  --sklearn-color-unfitted-level-0: #fff5e6;\n",
       "  --sklearn-color-unfitted-level-1: #f6e4d2;\n",
       "  --sklearn-color-unfitted-level-2: #ffe0b3;\n",
       "  --sklearn-color-unfitted-level-3: chocolate;\n",
       "  /* Definition of color scheme for fitted estimators */\n",
       "  --sklearn-color-fitted-level-0: #f0f8ff;\n",
       "  --sklearn-color-fitted-level-1: #d4ebff;\n",
       "  --sklearn-color-fitted-level-2: #b3dbfd;\n",
       "  --sklearn-color-fitted-level-3: cornflowerblue;\n",
       "\n",
       "  /* Specific color for light theme */\n",
       "  --sklearn-color-text-on-default-background: var(--sg-text-color, var(--theme-code-foreground, var(--jp-content-font-color1, black)));\n",
       "  --sklearn-color-background: var(--sg-background-color, var(--theme-background, var(--jp-layout-color0, white)));\n",
       "  --sklearn-color-border-box: var(--sg-text-color, var(--theme-code-foreground, var(--jp-content-font-color1, black)));\n",
       "  --sklearn-color-icon: #696969;\n",
       "\n",
       "  @media (prefers-color-scheme: dark) {\n",
       "    /* Redefinition of color scheme for dark theme */\n",
       "    --sklearn-color-text-on-default-background: var(--sg-text-color, var(--theme-code-foreground, var(--jp-content-font-color1, white)));\n",
       "    --sklearn-color-background: var(--sg-background-color, var(--theme-background, var(--jp-layout-color0, #111)));\n",
       "    --sklearn-color-border-box: var(--sg-text-color, var(--theme-code-foreground, var(--jp-content-font-color1, white)));\n",
       "    --sklearn-color-icon: #878787;\n",
       "  }\n",
       "}\n",
       "\n",
       "#sk-container-id-1 {\n",
       "  color: var(--sklearn-color-text);\n",
       "}\n",
       "\n",
       "#sk-container-id-1 pre {\n",
       "  padding: 0;\n",
       "}\n",
       "\n",
       "#sk-container-id-1 input.sk-hidden--visually {\n",
       "  border: 0;\n",
       "  clip: rect(1px 1px 1px 1px);\n",
       "  clip: rect(1px, 1px, 1px, 1px);\n",
       "  height: 1px;\n",
       "  margin: -1px;\n",
       "  overflow: hidden;\n",
       "  padding: 0;\n",
       "  position: absolute;\n",
       "  width: 1px;\n",
       "}\n",
       "\n",
       "#sk-container-id-1 div.sk-dashed-wrapped {\n",
       "  border: 1px dashed var(--sklearn-color-line);\n",
       "  margin: 0 0.4em 0.5em 0.4em;\n",
       "  box-sizing: border-box;\n",
       "  padding-bottom: 0.4em;\n",
       "  background-color: var(--sklearn-color-background);\n",
       "}\n",
       "\n",
       "#sk-container-id-1 div.sk-container {\n",
       "  /* jupyter's `normalize.less` sets `[hidden] { display: none; }`\n",
       "     but bootstrap.min.css set `[hidden] { display: none !important; }`\n",
       "     so we also need the `!important` here to be able to override the\n",
       "     default hidden behavior on the sphinx rendered scikit-learn.org.\n",
       "     See: https://github.com/scikit-learn/scikit-learn/issues/21755 */\n",
       "  display: inline-block !important;\n",
       "  position: relative;\n",
       "}\n",
       "\n",
       "#sk-container-id-1 div.sk-text-repr-fallback {\n",
       "  display: none;\n",
       "}\n",
       "\n",
       "div.sk-parallel-item,\n",
       "div.sk-serial,\n",
       "div.sk-item {\n",
       "  /* draw centered vertical line to link estimators */\n",
       "  background-image: linear-gradient(var(--sklearn-color-text-on-default-background), var(--sklearn-color-text-on-default-background));\n",
       "  background-size: 2px 100%;\n",
       "  background-repeat: no-repeat;\n",
       "  background-position: center center;\n",
       "}\n",
       "\n",
       "/* Parallel-specific style estimator block */\n",
       "\n",
       "#sk-container-id-1 div.sk-parallel-item::after {\n",
       "  content: \"\";\n",
       "  width: 100%;\n",
       "  border-bottom: 2px solid var(--sklearn-color-text-on-default-background);\n",
       "  flex-grow: 1;\n",
       "}\n",
       "\n",
       "#sk-container-id-1 div.sk-parallel {\n",
       "  display: flex;\n",
       "  align-items: stretch;\n",
       "  justify-content: center;\n",
       "  background-color: var(--sklearn-color-background);\n",
       "  position: relative;\n",
       "}\n",
       "\n",
       "#sk-container-id-1 div.sk-parallel-item {\n",
       "  display: flex;\n",
       "  flex-direction: column;\n",
       "}\n",
       "\n",
       "#sk-container-id-1 div.sk-parallel-item:first-child::after {\n",
       "  align-self: flex-end;\n",
       "  width: 50%;\n",
       "}\n",
       "\n",
       "#sk-container-id-1 div.sk-parallel-item:last-child::after {\n",
       "  align-self: flex-start;\n",
       "  width: 50%;\n",
       "}\n",
       "\n",
       "#sk-container-id-1 div.sk-parallel-item:only-child::after {\n",
       "  width: 0;\n",
       "}\n",
       "\n",
       "/* Serial-specific style estimator block */\n",
       "\n",
       "#sk-container-id-1 div.sk-serial {\n",
       "  display: flex;\n",
       "  flex-direction: column;\n",
       "  align-items: center;\n",
       "  background-color: var(--sklearn-color-background);\n",
       "  padding-right: 1em;\n",
       "  padding-left: 1em;\n",
       "}\n",
       "\n",
       "\n",
       "/* Toggleable style: style used for estimator/Pipeline/ColumnTransformer box that is\n",
       "clickable and can be expanded/collapsed.\n",
       "- Pipeline and ColumnTransformer use this feature and define the default style\n",
       "- Estimators will overwrite some part of the style using the `sk-estimator` class\n",
       "*/\n",
       "\n",
       "/* Pipeline and ColumnTransformer style (default) */\n",
       "\n",
       "#sk-container-id-1 div.sk-toggleable {\n",
       "  /* Default theme specific background. It is overwritten whether we have a\n",
       "  specific estimator or a Pipeline/ColumnTransformer */\n",
       "  background-color: var(--sklearn-color-background);\n",
       "}\n",
       "\n",
       "/* Toggleable label */\n",
       "#sk-container-id-1 label.sk-toggleable__label {\n",
       "  cursor: pointer;\n",
       "  display: block;\n",
       "  width: 100%;\n",
       "  margin-bottom: 0;\n",
       "  padding: 0.5em;\n",
       "  box-sizing: border-box;\n",
       "  text-align: center;\n",
       "}\n",
       "\n",
       "#sk-container-id-1 label.sk-toggleable__label-arrow:before {\n",
       "  /* Arrow on the left of the label */\n",
       "  content: \"▸\";\n",
       "  float: left;\n",
       "  margin-right: 0.25em;\n",
       "  color: var(--sklearn-color-icon);\n",
       "}\n",
       "\n",
       "#sk-container-id-1 label.sk-toggleable__label-arrow:hover:before {\n",
       "  color: var(--sklearn-color-text);\n",
       "}\n",
       "\n",
       "/* Toggleable content - dropdown */\n",
       "\n",
       "#sk-container-id-1 div.sk-toggleable__content {\n",
       "  max-height: 0;\n",
       "  max-width: 0;\n",
       "  overflow: hidden;\n",
       "  text-align: left;\n",
       "  /* unfitted */\n",
       "  background-color: var(--sklearn-color-unfitted-level-0);\n",
       "}\n",
       "\n",
       "#sk-container-id-1 div.sk-toggleable__content.fitted {\n",
       "  /* fitted */\n",
       "  background-color: var(--sklearn-color-fitted-level-0);\n",
       "}\n",
       "\n",
       "#sk-container-id-1 div.sk-toggleable__content pre {\n",
       "  margin: 0.2em;\n",
       "  border-radius: 0.25em;\n",
       "  color: var(--sklearn-color-text);\n",
       "  /* unfitted */\n",
       "  background-color: var(--sklearn-color-unfitted-level-0);\n",
       "}\n",
       "\n",
       "#sk-container-id-1 div.sk-toggleable__content.fitted pre {\n",
       "  /* unfitted */\n",
       "  background-color: var(--sklearn-color-fitted-level-0);\n",
       "}\n",
       "\n",
       "#sk-container-id-1 input.sk-toggleable__control:checked~div.sk-toggleable__content {\n",
       "  /* Expand drop-down */\n",
       "  max-height: 200px;\n",
       "  max-width: 100%;\n",
       "  overflow: auto;\n",
       "}\n",
       "\n",
       "#sk-container-id-1 input.sk-toggleable__control:checked~label.sk-toggleable__label-arrow:before {\n",
       "  content: \"▾\";\n",
       "}\n",
       "\n",
       "/* Pipeline/ColumnTransformer-specific style */\n",
       "\n",
       "#sk-container-id-1 div.sk-label input.sk-toggleable__control:checked~label.sk-toggleable__label {\n",
       "  color: var(--sklearn-color-text);\n",
       "  background-color: var(--sklearn-color-unfitted-level-2);\n",
       "}\n",
       "\n",
       "#sk-container-id-1 div.sk-label.fitted input.sk-toggleable__control:checked~label.sk-toggleable__label {\n",
       "  background-color: var(--sklearn-color-fitted-level-2);\n",
       "}\n",
       "\n",
       "/* Estimator-specific style */\n",
       "\n",
       "/* Colorize estimator box */\n",
       "#sk-container-id-1 div.sk-estimator input.sk-toggleable__control:checked~label.sk-toggleable__label {\n",
       "  /* unfitted */\n",
       "  background-color: var(--sklearn-color-unfitted-level-2);\n",
       "}\n",
       "\n",
       "#sk-container-id-1 div.sk-estimator.fitted input.sk-toggleable__control:checked~label.sk-toggleable__label {\n",
       "  /* fitted */\n",
       "  background-color: var(--sklearn-color-fitted-level-2);\n",
       "}\n",
       "\n",
       "#sk-container-id-1 div.sk-label label.sk-toggleable__label,\n",
       "#sk-container-id-1 div.sk-label label {\n",
       "  /* The background is the default theme color */\n",
       "  color: var(--sklearn-color-text-on-default-background);\n",
       "}\n",
       "\n",
       "/* On hover, darken the color of the background */\n",
       "#sk-container-id-1 div.sk-label:hover label.sk-toggleable__label {\n",
       "  color: var(--sklearn-color-text);\n",
       "  background-color: var(--sklearn-color-unfitted-level-2);\n",
       "}\n",
       "\n",
       "/* Label box, darken color on hover, fitted */\n",
       "#sk-container-id-1 div.sk-label.fitted:hover label.sk-toggleable__label.fitted {\n",
       "  color: var(--sklearn-color-text);\n",
       "  background-color: var(--sklearn-color-fitted-level-2);\n",
       "}\n",
       "\n",
       "/* Estimator label */\n",
       "\n",
       "#sk-container-id-1 div.sk-label label {\n",
       "  font-family: monospace;\n",
       "  font-weight: bold;\n",
       "  display: inline-block;\n",
       "  line-height: 1.2em;\n",
       "}\n",
       "\n",
       "#sk-container-id-1 div.sk-label-container {\n",
       "  text-align: center;\n",
       "}\n",
       "\n",
       "/* Estimator-specific */\n",
       "#sk-container-id-1 div.sk-estimator {\n",
       "  font-family: monospace;\n",
       "  border: 1px dotted var(--sklearn-color-border-box);\n",
       "  border-radius: 0.25em;\n",
       "  box-sizing: border-box;\n",
       "  margin-bottom: 0.5em;\n",
       "  /* unfitted */\n",
       "  background-color: var(--sklearn-color-unfitted-level-0);\n",
       "}\n",
       "\n",
       "#sk-container-id-1 div.sk-estimator.fitted {\n",
       "  /* fitted */\n",
       "  background-color: var(--sklearn-color-fitted-level-0);\n",
       "}\n",
       "\n",
       "/* on hover */\n",
       "#sk-container-id-1 div.sk-estimator:hover {\n",
       "  /* unfitted */\n",
       "  background-color: var(--sklearn-color-unfitted-level-2);\n",
       "}\n",
       "\n",
       "#sk-container-id-1 div.sk-estimator.fitted:hover {\n",
       "  /* fitted */\n",
       "  background-color: var(--sklearn-color-fitted-level-2);\n",
       "}\n",
       "\n",
       "/* Specification for estimator info (e.g. \"i\" and \"?\") */\n",
       "\n",
       "/* Common style for \"i\" and \"?\" */\n",
       "\n",
       ".sk-estimator-doc-link,\n",
       "a:link.sk-estimator-doc-link,\n",
       "a:visited.sk-estimator-doc-link {\n",
       "  float: right;\n",
       "  font-size: smaller;\n",
       "  line-height: 1em;\n",
       "  font-family: monospace;\n",
       "  background-color: var(--sklearn-color-background);\n",
       "  border-radius: 1em;\n",
       "  height: 1em;\n",
       "  width: 1em;\n",
       "  text-decoration: none !important;\n",
       "  margin-left: 1ex;\n",
       "  /* unfitted */\n",
       "  border: var(--sklearn-color-unfitted-level-1) 1pt solid;\n",
       "  color: var(--sklearn-color-unfitted-level-1);\n",
       "}\n",
       "\n",
       ".sk-estimator-doc-link.fitted,\n",
       "a:link.sk-estimator-doc-link.fitted,\n",
       "a:visited.sk-estimator-doc-link.fitted {\n",
       "  /* fitted */\n",
       "  border: var(--sklearn-color-fitted-level-1) 1pt solid;\n",
       "  color: var(--sklearn-color-fitted-level-1);\n",
       "}\n",
       "\n",
       "/* On hover */\n",
       "div.sk-estimator:hover .sk-estimator-doc-link:hover,\n",
       ".sk-estimator-doc-link:hover,\n",
       "div.sk-label-container:hover .sk-estimator-doc-link:hover,\n",
       ".sk-estimator-doc-link:hover {\n",
       "  /* unfitted */\n",
       "  background-color: var(--sklearn-color-unfitted-level-3);\n",
       "  color: var(--sklearn-color-background);\n",
       "  text-decoration: none;\n",
       "}\n",
       "\n",
       "div.sk-estimator.fitted:hover .sk-estimator-doc-link.fitted:hover,\n",
       ".sk-estimator-doc-link.fitted:hover,\n",
       "div.sk-label-container:hover .sk-estimator-doc-link.fitted:hover,\n",
       ".sk-estimator-doc-link.fitted:hover {\n",
       "  /* fitted */\n",
       "  background-color: var(--sklearn-color-fitted-level-3);\n",
       "  color: var(--sklearn-color-background);\n",
       "  text-decoration: none;\n",
       "}\n",
       "\n",
       "/* Span, style for the box shown on hovering the info icon */\n",
       ".sk-estimator-doc-link span {\n",
       "  display: none;\n",
       "  z-index: 9999;\n",
       "  position: relative;\n",
       "  font-weight: normal;\n",
       "  right: .2ex;\n",
       "  padding: .5ex;\n",
       "  margin: .5ex;\n",
       "  width: min-content;\n",
       "  min-width: 20ex;\n",
       "  max-width: 50ex;\n",
       "  color: var(--sklearn-color-text);\n",
       "  box-shadow: 2pt 2pt 4pt #999;\n",
       "  /* unfitted */\n",
       "  background: var(--sklearn-color-unfitted-level-0);\n",
       "  border: .5pt solid var(--sklearn-color-unfitted-level-3);\n",
       "}\n",
       "\n",
       ".sk-estimator-doc-link.fitted span {\n",
       "  /* fitted */\n",
       "  background: var(--sklearn-color-fitted-level-0);\n",
       "  border: var(--sklearn-color-fitted-level-3);\n",
       "}\n",
       "\n",
       ".sk-estimator-doc-link:hover span {\n",
       "  display: block;\n",
       "}\n",
       "\n",
       "/* \"?\"-specific style due to the `<a>` HTML tag */\n",
       "\n",
       "#sk-container-id-1 a.estimator_doc_link {\n",
       "  float: right;\n",
       "  font-size: 1rem;\n",
       "  line-height: 1em;\n",
       "  font-family: monospace;\n",
       "  background-color: var(--sklearn-color-background);\n",
       "  border-radius: 1rem;\n",
       "  height: 1rem;\n",
       "  width: 1rem;\n",
       "  text-decoration: none;\n",
       "  /* unfitted */\n",
       "  color: var(--sklearn-color-unfitted-level-1);\n",
       "  border: var(--sklearn-color-unfitted-level-1) 1pt solid;\n",
       "}\n",
       "\n",
       "#sk-container-id-1 a.estimator_doc_link.fitted {\n",
       "  /* fitted */\n",
       "  border: var(--sklearn-color-fitted-level-1) 1pt solid;\n",
       "  color: var(--sklearn-color-fitted-level-1);\n",
       "}\n",
       "\n",
       "/* On hover */\n",
       "#sk-container-id-1 a.estimator_doc_link:hover {\n",
       "  /* unfitted */\n",
       "  background-color: var(--sklearn-color-unfitted-level-3);\n",
       "  color: var(--sklearn-color-background);\n",
       "  text-decoration: none;\n",
       "}\n",
       "\n",
       "#sk-container-id-1 a.estimator_doc_link.fitted:hover {\n",
       "  /* fitted */\n",
       "  background-color: var(--sklearn-color-fitted-level-3);\n",
       "}\n",
       "</style><div id=\"sk-container-id-1\" class=\"sk-top-container\"><div class=\"sk-text-repr-fallback\"><pre>Pipeline(steps=[(&#x27;featureunion-1&#x27;,\n",
       "                 FeatureUnion(transformer_list=[(&#x27;pipeline-1&#x27;,\n",
       "                                                 Pipeline(steps=[(&#x27;columntransformer&#x27;,\n",
       "                                                                  ColumnTransformer(transformers=[(&#x27;passthrough&#x27;,\n",
       "                                                                                                   &#x27;passthrough&#x27;,\n",
       "                                                                                                   &lt;sklearn.compose._column_transformer.make_column_selector object at 0x7d354d946290&gt;)])),\n",
       "                                                                 (&#x27;simpleimputer&#x27;,\n",
       "                                                                  SimpleImputer(fill_value=&#x27;missing&#x27;,\n",
       "                                                                                strategy=&#x27;constant&#x27;)),\n",
       "                                                                 (&#x27;onehotencode...\n",
       "                 VarianceThreshold(threshold=0.6738938110936)),\n",
       "                (&#x27;featureunion-2&#x27;,\n",
       "                 FeatureUnion(transformer_list=[(&#x27;pipeline-1&#x27;,\n",
       "                                                 Pipeline(steps=[(&#x27;passthrough&#x27;,\n",
       "                                                                  Passthrough())])),\n",
       "                                                (&#x27;pipeline-2&#x27;,\n",
       "                                                 Pipeline(steps=[(&#x27;polynomialfeatures&#x27;,\n",
       "                                                                  PolynomialFeatures(degree=3))])),\n",
       "                                                (&#x27;pipeline-3&#x27;,\n",
       "                                                 Pipeline(steps=[(&#x27;zerocount&#x27;,\n",
       "                                                                  ZeroCount())]))])),\n",
       "                (&#x27;randomforestclassifier&#x27;,\n",
       "                 RandomForestClassifier(n_estimators=16))])</pre><b>In a Jupyter environment, please rerun this cell to show the HTML representation or trust the notebook. <br />On GitHub, the HTML representation is unable to render, please try loading this page with nbviewer.org.</b></div><div class=\"sk-container\" hidden><div class=\"sk-item sk-dashed-wrapped\"><div class=\"sk-label-container\"><div class=\"sk-label  sk-toggleable\"><input class=\"sk-toggleable__control sk-hidden--visually\" id=\"sk-estimator-id-1\" type=\"checkbox\" ><label for=\"sk-estimator-id-1\" class=\"sk-toggleable__label  sk-toggleable__label-arrow \">&nbsp;&nbsp;Pipeline<a class=\"sk-estimator-doc-link \" rel=\"noreferrer\" target=\"_blank\" href=\"https://scikit-learn.org/1.4/modules/generated/sklearn.pipeline.Pipeline.html\">?<span>Documentation for Pipeline</span></a><span class=\"sk-estimator-doc-link \">i<span>Not fitted</span></span></label><div class=\"sk-toggleable__content \"><pre>Pipeline(steps=[(&#x27;featureunion-1&#x27;,\n",
       "                 FeatureUnion(transformer_list=[(&#x27;pipeline-1&#x27;,\n",
       "                                                 Pipeline(steps=[(&#x27;columntransformer&#x27;,\n",
       "                                                                  ColumnTransformer(transformers=[(&#x27;passthrough&#x27;,\n",
       "                                                                                                   &#x27;passthrough&#x27;,\n",
       "                                                                                                   &lt;sklearn.compose._column_transformer.make_column_selector object at 0x7d354d946290&gt;)])),\n",
       "                                                                 (&#x27;simpleimputer&#x27;,\n",
       "                                                                  SimpleImputer(fill_value=&#x27;missing&#x27;,\n",
       "                                                                                strategy=&#x27;constant&#x27;)),\n",
       "                                                                 (&#x27;onehotencode...\n",
       "                 VarianceThreshold(threshold=0.6738938110936)),\n",
       "                (&#x27;featureunion-2&#x27;,\n",
       "                 FeatureUnion(transformer_list=[(&#x27;pipeline-1&#x27;,\n",
       "                                                 Pipeline(steps=[(&#x27;passthrough&#x27;,\n",
       "                                                                  Passthrough())])),\n",
       "                                                (&#x27;pipeline-2&#x27;,\n",
       "                                                 Pipeline(steps=[(&#x27;polynomialfeatures&#x27;,\n",
       "                                                                  PolynomialFeatures(degree=3))])),\n",
       "                                                (&#x27;pipeline-3&#x27;,\n",
       "                                                 Pipeline(steps=[(&#x27;zerocount&#x27;,\n",
       "                                                                  ZeroCount())]))])),\n",
       "                (&#x27;randomforestclassifier&#x27;,\n",
       "                 RandomForestClassifier(n_estimators=16))])</pre></div> </div></div><div class=\"sk-serial\"><div class=\"sk-item sk-dashed-wrapped\"><div class=\"sk-label-container\"><div class=\"sk-label  sk-toggleable\"><input class=\"sk-toggleable__control sk-hidden--visually\" id=\"sk-estimator-id-2\" type=\"checkbox\" ><label for=\"sk-estimator-id-2\" class=\"sk-toggleable__label  sk-toggleable__label-arrow \">&nbsp;featureunion-1: FeatureUnion<a class=\"sk-estimator-doc-link \" rel=\"noreferrer\" target=\"_blank\" href=\"https://scikit-learn.org/1.4/modules/generated/sklearn.pipeline.FeatureUnion.html\">?<span>Documentation for featureunion-1: FeatureUnion</span></a></label><div class=\"sk-toggleable__content \"><pre>FeatureUnion(transformer_list=[(&#x27;pipeline-1&#x27;,\n",
       "                                Pipeline(steps=[(&#x27;columntransformer&#x27;,\n",
       "                                                 ColumnTransformer(transformers=[(&#x27;passthrough&#x27;,\n",
       "                                                                                  &#x27;passthrough&#x27;,\n",
       "                                                                                  &lt;sklearn.compose._column_transformer.make_column_selector object at 0x7d354d946290&gt;)])),\n",
       "                                                (&#x27;simpleimputer&#x27;,\n",
       "                                                 SimpleImputer(fill_value=&#x27;missing&#x27;,\n",
       "                                                               strategy=&#x27;constant&#x27;)),\n",
       "                                                (&#x27;onehotencoder&#x27;,\n",
       "                                                 OneHotEncoder(drop=&#x27;first&#x27;,\n",
       "                                                               sparse_output=False))])),\n",
       "                               (&#x27;pipeline-2&#x27;,\n",
       "                                Pipeline(steps=[(&#x27;columntransformer&#x27;,\n",
       "                                                 ColumnTransformer(transformers=[(&#x27;passthrough&#x27;,\n",
       "                                                                                  &#x27;passthrough&#x27;,\n",
       "                                                                                  &lt;sklearn.compose._column_transformer.make_column_selector object at 0x7d34edf94fa0&gt;)])),\n",
       "                                                (&#x27;simpleimputer&#x27;,\n",
       "                                                 SimpleImputer(strategy=&#x27;median&#x27;))]))])</pre></div> </div></div><div class=\"sk-parallel\"><div class=\"sk-parallel-item\"><div class=\"sk-item\"><div class=\"sk-label-container\"><div class=\"sk-label  sk-toggleable\"><label>pipeline-1</label></div></div><div class=\"sk-serial\"><div class=\"sk-item\"><div class=\"sk-serial\"><div class=\"sk-item sk-dashed-wrapped\"><div class=\"sk-label-container\"><div class=\"sk-label  sk-toggleable\"><input class=\"sk-toggleable__control sk-hidden--visually\" id=\"sk-estimator-id-3\" type=\"checkbox\" ><label for=\"sk-estimator-id-3\" class=\"sk-toggleable__label  sk-toggleable__label-arrow \">&nbsp;columntransformer: ColumnTransformer<a class=\"sk-estimator-doc-link \" rel=\"noreferrer\" target=\"_blank\" href=\"https://scikit-learn.org/1.4/modules/generated/sklearn.compose.ColumnTransformer.html\">?<span>Documentation for columntransformer: ColumnTransformer</span></a></label><div class=\"sk-toggleable__content \"><pre>ColumnTransformer(transformers=[(&#x27;passthrough&#x27;, &#x27;passthrough&#x27;,\n",
       "                                 &lt;sklearn.compose._column_transformer.make_column_selector object at 0x7d354d946290&gt;)])</pre></div> </div></div><div class=\"sk-parallel\"><div class=\"sk-parallel-item\"><div class=\"sk-item\"><div class=\"sk-label-container\"><div class=\"sk-label  sk-toggleable\"><input class=\"sk-toggleable__control sk-hidden--visually\" id=\"sk-estimator-id-4\" type=\"checkbox\" ><label for=\"sk-estimator-id-4\" class=\"sk-toggleable__label  sk-toggleable__label-arrow \">passthrough</label><div class=\"sk-toggleable__content \"><pre>&lt;sklearn.compose._column_transformer.make_column_selector object at 0x7d354d946290&gt;</pre></div> </div></div><div class=\"sk-serial\"><div class=\"sk-item\"><div class=\"sk-estimator  sk-toggleable\"><input class=\"sk-toggleable__control sk-hidden--visually\" id=\"sk-estimator-id-5\" type=\"checkbox\" ><label for=\"sk-estimator-id-5\" class=\"sk-toggleable__label  sk-toggleable__label-arrow \">passthrough</label><div class=\"sk-toggleable__content \"><pre>passthrough</pre></div> </div></div></div></div></div></div></div><div class=\"sk-item\"><div class=\"sk-estimator  sk-toggleable\"><input class=\"sk-toggleable__control sk-hidden--visually\" id=\"sk-estimator-id-6\" type=\"checkbox\" ><label for=\"sk-estimator-id-6\" class=\"sk-toggleable__label  sk-toggleable__label-arrow \">&nbsp;SimpleImputer<a class=\"sk-estimator-doc-link \" rel=\"noreferrer\" target=\"_blank\" href=\"https://scikit-learn.org/1.4/modules/generated/sklearn.impute.SimpleImputer.html\">?<span>Documentation for SimpleImputer</span></a></label><div class=\"sk-toggleable__content \"><pre>SimpleImputer(fill_value=&#x27;missing&#x27;, strategy=&#x27;constant&#x27;)</pre></div> </div></div><div class=\"sk-item\"><div class=\"sk-estimator  sk-toggleable\"><input class=\"sk-toggleable__control sk-hidden--visually\" id=\"sk-estimator-id-7\" type=\"checkbox\" ><label for=\"sk-estimator-id-7\" class=\"sk-toggleable__label  sk-toggleable__label-arrow \">&nbsp;OneHotEncoder<a class=\"sk-estimator-doc-link \" rel=\"noreferrer\" target=\"_blank\" href=\"https://scikit-learn.org/1.4/modules/generated/sklearn.preprocessing.OneHotEncoder.html\">?<span>Documentation for OneHotEncoder</span></a></label><div class=\"sk-toggleable__content \"><pre>OneHotEncoder(drop=&#x27;first&#x27;, sparse_output=False)</pre></div> </div></div></div></div></div></div></div><div class=\"sk-parallel-item\"><div class=\"sk-item\"><div class=\"sk-label-container\"><div class=\"sk-label  sk-toggleable\"><label>pipeline-2</label></div></div><div class=\"sk-serial\"><div class=\"sk-item\"><div class=\"sk-serial\"><div class=\"sk-item sk-dashed-wrapped\"><div class=\"sk-label-container\"><div class=\"sk-label  sk-toggleable\"><input class=\"sk-toggleable__control sk-hidden--visually\" id=\"sk-estimator-id-8\" type=\"checkbox\" ><label for=\"sk-estimator-id-8\" class=\"sk-toggleable__label  sk-toggleable__label-arrow \">&nbsp;columntransformer: ColumnTransformer<a class=\"sk-estimator-doc-link \" rel=\"noreferrer\" target=\"_blank\" href=\"https://scikit-learn.org/1.4/modules/generated/sklearn.compose.ColumnTransformer.html\">?<span>Documentation for columntransformer: ColumnTransformer</span></a></label><div class=\"sk-toggleable__content \"><pre>ColumnTransformer(transformers=[(&#x27;passthrough&#x27;, &#x27;passthrough&#x27;,\n",
       "                                 &lt;sklearn.compose._column_transformer.make_column_selector object at 0x7d34edf94fa0&gt;)])</pre></div> </div></div><div class=\"sk-parallel\"><div class=\"sk-parallel-item\"><div class=\"sk-item\"><div class=\"sk-label-container\"><div class=\"sk-label  sk-toggleable\"><input class=\"sk-toggleable__control sk-hidden--visually\" id=\"sk-estimator-id-9\" type=\"checkbox\" ><label for=\"sk-estimator-id-9\" class=\"sk-toggleable__label  sk-toggleable__label-arrow \">passthrough</label><div class=\"sk-toggleable__content \"><pre>&lt;sklearn.compose._column_transformer.make_column_selector object at 0x7d34edf94fa0&gt;</pre></div> </div></div><div class=\"sk-serial\"><div class=\"sk-item\"><div class=\"sk-estimator  sk-toggleable\"><input class=\"sk-toggleable__control sk-hidden--visually\" id=\"sk-estimator-id-10\" type=\"checkbox\" ><label for=\"sk-estimator-id-10\" class=\"sk-toggleable__label  sk-toggleable__label-arrow \">passthrough</label><div class=\"sk-toggleable__content \"><pre>passthrough</pre></div> </div></div></div></div></div></div></div><div class=\"sk-item\"><div class=\"sk-estimator  sk-toggleable\"><input class=\"sk-toggleable__control sk-hidden--visually\" id=\"sk-estimator-id-11\" type=\"checkbox\" ><label for=\"sk-estimator-id-11\" class=\"sk-toggleable__label  sk-toggleable__label-arrow \">&nbsp;SimpleImputer<a class=\"sk-estimator-doc-link \" rel=\"noreferrer\" target=\"_blank\" href=\"https://scikit-learn.org/1.4/modules/generated/sklearn.impute.SimpleImputer.html\">?<span>Documentation for SimpleImputer</span></a></label><div class=\"sk-toggleable__content \"><pre>SimpleImputer(strategy=&#x27;median&#x27;)</pre></div> </div></div></div></div></div></div></div></div></div><div class=\"sk-item\"><div class=\"sk-estimator  sk-toggleable\"><input class=\"sk-toggleable__control sk-hidden--visually\" id=\"sk-estimator-id-12\" type=\"checkbox\" ><label for=\"sk-estimator-id-12\" class=\"sk-toggleable__label  sk-toggleable__label-arrow \">&nbsp;VarianceThreshold<a class=\"sk-estimator-doc-link \" rel=\"noreferrer\" target=\"_blank\" href=\"https://scikit-learn.org/1.4/modules/generated/sklearn.feature_selection.VarianceThreshold.html\">?<span>Documentation for VarianceThreshold</span></a></label><div class=\"sk-toggleable__content \"><pre>VarianceThreshold(threshold=0.6738938110936)</pre></div> </div></div><div class=\"sk-item sk-dashed-wrapped\"><div class=\"sk-label-container\"><div class=\"sk-label  sk-toggleable\"><input class=\"sk-toggleable__control sk-hidden--visually\" id=\"sk-estimator-id-13\" type=\"checkbox\" ><label for=\"sk-estimator-id-13\" class=\"sk-toggleable__label  sk-toggleable__label-arrow \">&nbsp;featureunion-2: FeatureUnion<a class=\"sk-estimator-doc-link \" rel=\"noreferrer\" target=\"_blank\" href=\"https://scikit-learn.org/1.4/modules/generated/sklearn.pipeline.FeatureUnion.html\">?<span>Documentation for featureunion-2: FeatureUnion</span></a></label><div class=\"sk-toggleable__content \"><pre>FeatureUnion(transformer_list=[(&#x27;pipeline-1&#x27;,\n",
       "                                Pipeline(steps=[(&#x27;passthrough&#x27;,\n",
       "                                                 Passthrough())])),\n",
       "                               (&#x27;pipeline-2&#x27;,\n",
       "                                Pipeline(steps=[(&#x27;polynomialfeatures&#x27;,\n",
       "                                                 PolynomialFeatures(degree=3))])),\n",
       "                               (&#x27;pipeline-3&#x27;,\n",
       "                                Pipeline(steps=[(&#x27;zerocount&#x27;, ZeroCount())]))])</pre></div> </div></div><div class=\"sk-parallel\"><div class=\"sk-parallel-item\"><div class=\"sk-item\"><div class=\"sk-label-container\"><div class=\"sk-label  sk-toggleable\"><label>pipeline-1</label></div></div><div class=\"sk-serial\"><div class=\"sk-item\"><div class=\"sk-serial\"><div class=\"sk-item\"><div class=\"sk-estimator  sk-toggleable\"><input class=\"sk-toggleable__control sk-hidden--visually\" id=\"sk-estimator-id-14\" type=\"checkbox\" ><label for=\"sk-estimator-id-14\" class=\"sk-toggleable__label  sk-toggleable__label-arrow \">Passthrough</label><div class=\"sk-toggleable__content \"><pre>Passthrough()</pre></div> </div></div></div></div></div></div></div><div class=\"sk-parallel-item\"><div class=\"sk-item\"><div class=\"sk-label-container\"><div class=\"sk-label  sk-toggleable\"><label>pipeline-2</label></div></div><div class=\"sk-serial\"><div class=\"sk-item\"><div class=\"sk-serial\"><div class=\"sk-item\"><div class=\"sk-estimator  sk-toggleable\"><input class=\"sk-toggleable__control sk-hidden--visually\" id=\"sk-estimator-id-15\" type=\"checkbox\" ><label for=\"sk-estimator-id-15\" class=\"sk-toggleable__label  sk-toggleable__label-arrow \">&nbsp;PolynomialFeatures<a class=\"sk-estimator-doc-link \" rel=\"noreferrer\" target=\"_blank\" href=\"https://scikit-learn.org/1.4/modules/generated/sklearn.preprocessing.PolynomialFeatures.html\">?<span>Documentation for PolynomialFeatures</span></a></label><div class=\"sk-toggleable__content \"><pre>PolynomialFeatures(degree=3)</pre></div> </div></div></div></div></div></div></div><div class=\"sk-parallel-item\"><div class=\"sk-item\"><div class=\"sk-label-container\"><div class=\"sk-label  sk-toggleable\"><label>pipeline-3</label></div></div><div class=\"sk-serial\"><div class=\"sk-item\"><div class=\"sk-serial\"><div class=\"sk-item\"><div class=\"sk-estimator  sk-toggleable\"><input class=\"sk-toggleable__control sk-hidden--visually\" id=\"sk-estimator-id-16\" type=\"checkbox\" ><label for=\"sk-estimator-id-16\" class=\"sk-toggleable__label  sk-toggleable__label-arrow \">ZeroCount</label><div class=\"sk-toggleable__content \"><pre>ZeroCount()</pre></div> </div></div></div></div></div></div></div></div></div><div class=\"sk-item\"><div class=\"sk-estimator  sk-toggleable\"><input class=\"sk-toggleable__control sk-hidden--visually\" id=\"sk-estimator-id-17\" type=\"checkbox\" ><label for=\"sk-estimator-id-17\" class=\"sk-toggleable__label  sk-toggleable__label-arrow \">&nbsp;RandomForestClassifier<a class=\"sk-estimator-doc-link \" rel=\"noreferrer\" target=\"_blank\" href=\"https://scikit-learn.org/1.4/modules/generated/sklearn.ensemble.RandomForestClassifier.html\">?<span>Documentation for RandomForestClassifier</span></a></label><div class=\"sk-toggleable__content \"><pre>RandomForestClassifier(n_estimators=16)</pre></div> </div></div></div></div></div></div>"
      ],
      "text/plain": [
       "Pipeline(steps=[('featureunion-1',\n",
       "                 FeatureUnion(transformer_list=[('pipeline-1',\n",
       "                                                 Pipeline(steps=[('columntransformer',\n",
       "                                                                  ColumnTransformer(transformers=[('passthrough',\n",
       "                                                                                                   'passthrough',\n",
       "                                                                                                   <sklearn.compose._column_transformer.make_column_selector object at 0x7d354d946290>)])),\n",
       "                                                                 ('simpleimputer',\n",
       "                                                                  SimpleImputer(fill_value='missing',\n",
       "                                                                                strategy='constant')),\n",
       "                                                                 ('onehotencode...\n",
       "                 VarianceThreshold(threshold=0.6738938110936)),\n",
       "                ('featureunion-2',\n",
       "                 FeatureUnion(transformer_list=[('pipeline-1',\n",
       "                                                 Pipeline(steps=[('passthrough',\n",
       "                                                                  Passthrough())])),\n",
       "                                                ('pipeline-2',\n",
       "                                                 Pipeline(steps=[('polynomialfeatures',\n",
       "                                                                  PolynomialFeatures(degree=3))])),\n",
       "                                                ('pipeline-3',\n",
       "                                                 Pipeline(steps=[('zerocount',\n",
       "                                                                  ZeroCount())]))])),\n",
       "                ('randomforestclassifier',\n",
       "                 RandomForestClassifier(n_estimators=16))])"
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "#convert to tpot search space\n",
    "tpot_search_space = tpot.utils.tpot_parser(pipeline)\n",
    "\n",
    "# sample a pipeline from the tpot search space\n",
    "tpot_search_space.generate().export_pipeline()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "Generation:  50%|█████     | 1/2 [00:02<00:02,  2.60s/it]"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Generation:  1\n",
      "Best roc_auc_score score: 0.976\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "Generation: 100%|██████████| 2/2 [00:03<00:00,  1.57s/it]\n",
      "2024-09-09 17:25:40,301 - distributed.scheduler - ERROR - Removing worker 'tcp://127.0.0.1:39897' caused the cluster to lose scattered data, which can't be recovered: {'ndarray-3f2f44921e6e9cc40ef07cfcd8ae90fb', 'DataFrame-5551f84174fd651642ff10eb71e30b22'} (stimulus_id='handle-worker-cleanup-1725927940.3010821')\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Generation:  2\n",
      "Best roc_auc_score score: 0.984\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "<style>#sk-container-id-2 {\n",
       "  /* Definition of color scheme common for light and dark mode */\n",
       "  --sklearn-color-text: black;\n",
       "  --sklearn-color-line: gray;\n",
       "  /* Definition of color scheme for unfitted estimators */\n",
       "  --sklearn-color-unfitted-level-0: #fff5e6;\n",
       "  --sklearn-color-unfitted-level-1: #f6e4d2;\n",
       "  --sklearn-color-unfitted-level-2: #ffe0b3;\n",
       "  --sklearn-color-unfitted-level-3: chocolate;\n",
       "  /* Definition of color scheme for fitted estimators */\n",
       "  --sklearn-color-fitted-level-0: #f0f8ff;\n",
       "  --sklearn-color-fitted-level-1: #d4ebff;\n",
       "  --sklearn-color-fitted-level-2: #b3dbfd;\n",
       "  --sklearn-color-fitted-level-3: cornflowerblue;\n",
       "\n",
       "  /* Specific color for light theme */\n",
       "  --sklearn-color-text-on-default-background: var(--sg-text-color, var(--theme-code-foreground, var(--jp-content-font-color1, black)));\n",
       "  --sklearn-color-background: var(--sg-background-color, var(--theme-background, var(--jp-layout-color0, white)));\n",
       "  --sklearn-color-border-box: var(--sg-text-color, var(--theme-code-foreground, var(--jp-content-font-color1, black)));\n",
       "  --sklearn-color-icon: #696969;\n",
       "\n",
       "  @media (prefers-color-scheme: dark) {\n",
       "    /* Redefinition of color scheme for dark theme */\n",
       "    --sklearn-color-text-on-default-background: var(--sg-text-color, var(--theme-code-foreground, var(--jp-content-font-color1, white)));\n",
       "    --sklearn-color-background: var(--sg-background-color, var(--theme-background, var(--jp-layout-color0, #111)));\n",
       "    --sklearn-color-border-box: var(--sg-text-color, var(--theme-code-foreground, var(--jp-content-font-color1, white)));\n",
       "    --sklearn-color-icon: #878787;\n",
       "  }\n",
       "}\n",
       "\n",
       "#sk-container-id-2 {\n",
       "  color: var(--sklearn-color-text);\n",
       "}\n",
       "\n",
       "#sk-container-id-2 pre {\n",
       "  padding: 0;\n",
       "}\n",
       "\n",
       "#sk-container-id-2 input.sk-hidden--visually {\n",
       "  border: 0;\n",
       "  clip: rect(1px 1px 1px 1px);\n",
       "  clip: rect(1px, 1px, 1px, 1px);\n",
       "  height: 1px;\n",
       "  margin: -1px;\n",
       "  overflow: hidden;\n",
       "  padding: 0;\n",
       "  position: absolute;\n",
       "  width: 1px;\n",
       "}\n",
       "\n",
       "#sk-container-id-2 div.sk-dashed-wrapped {\n",
       "  border: 1px dashed var(--sklearn-color-line);\n",
       "  margin: 0 0.4em 0.5em 0.4em;\n",
       "  box-sizing: border-box;\n",
       "  padding-bottom: 0.4em;\n",
       "  background-color: var(--sklearn-color-background);\n",
       "}\n",
       "\n",
       "#sk-container-id-2 div.sk-container {\n",
       "  /* jupyter's `normalize.less` sets `[hidden] { display: none; }`\n",
       "     but bootstrap.min.css set `[hidden] { display: none !important; }`\n",
       "     so we also need the `!important` here to be able to override the\n",
       "     default hidden behavior on the sphinx rendered scikit-learn.org.\n",
       "     See: https://github.com/scikit-learn/scikit-learn/issues/21755 */\n",
       "  display: inline-block !important;\n",
       "  position: relative;\n",
       "}\n",
       "\n",
       "#sk-container-id-2 div.sk-text-repr-fallback {\n",
       "  display: none;\n",
       "}\n",
       "\n",
       "div.sk-parallel-item,\n",
       "div.sk-serial,\n",
       "div.sk-item {\n",
       "  /* draw centered vertical line to link estimators */\n",
       "  background-image: linear-gradient(var(--sklearn-color-text-on-default-background), var(--sklearn-color-text-on-default-background));\n",
       "  background-size: 2px 100%;\n",
       "  background-repeat: no-repeat;\n",
       "  background-position: center center;\n",
       "}\n",
       "\n",
       "/* Parallel-specific style estimator block */\n",
       "\n",
       "#sk-container-id-2 div.sk-parallel-item::after {\n",
       "  content: \"\";\n",
       "  width: 100%;\n",
       "  border-bottom: 2px solid var(--sklearn-color-text-on-default-background);\n",
       "  flex-grow: 1;\n",
       "}\n",
       "\n",
       "#sk-container-id-2 div.sk-parallel {\n",
       "  display: flex;\n",
       "  align-items: stretch;\n",
       "  justify-content: center;\n",
       "  background-color: var(--sklearn-color-background);\n",
       "  position: relative;\n",
       "}\n",
       "\n",
       "#sk-container-id-2 div.sk-parallel-item {\n",
       "  display: flex;\n",
       "  flex-direction: column;\n",
       "}\n",
       "\n",
       "#sk-container-id-2 div.sk-parallel-item:first-child::after {\n",
       "  align-self: flex-end;\n",
       "  width: 50%;\n",
       "}\n",
       "\n",
       "#sk-container-id-2 div.sk-parallel-item:last-child::after {\n",
       "  align-self: flex-start;\n",
       "  width: 50%;\n",
       "}\n",
       "\n",
       "#sk-container-id-2 div.sk-parallel-item:only-child::after {\n",
       "  width: 0;\n",
       "}\n",
       "\n",
       "/* Serial-specific style estimator block */\n",
       "\n",
       "#sk-container-id-2 div.sk-serial {\n",
       "  display: flex;\n",
       "  flex-direction: column;\n",
       "  align-items: center;\n",
       "  background-color: var(--sklearn-color-background);\n",
       "  padding-right: 1em;\n",
       "  padding-left: 1em;\n",
       "}\n",
       "\n",
       "\n",
       "/* Toggleable style: style used for estimator/Pipeline/ColumnTransformer box that is\n",
       "clickable and can be expanded/collapsed.\n",
       "- Pipeline and ColumnTransformer use this feature and define the default style\n",
       "- Estimators will overwrite some part of the style using the `sk-estimator` class\n",
       "*/\n",
       "\n",
       "/* Pipeline and ColumnTransformer style (default) */\n",
       "\n",
       "#sk-container-id-2 div.sk-toggleable {\n",
       "  /* Default theme specific background. It is overwritten whether we have a\n",
       "  specific estimator or a Pipeline/ColumnTransformer */\n",
       "  background-color: var(--sklearn-color-background);\n",
       "}\n",
       "\n",
       "/* Toggleable label */\n",
       "#sk-container-id-2 label.sk-toggleable__label {\n",
       "  cursor: pointer;\n",
       "  display: block;\n",
       "  width: 100%;\n",
       "  margin-bottom: 0;\n",
       "  padding: 0.5em;\n",
       "  box-sizing: border-box;\n",
       "  text-align: center;\n",
       "}\n",
       "\n",
       "#sk-container-id-2 label.sk-toggleable__label-arrow:before {\n",
       "  /* Arrow on the left of the label */\n",
       "  content: \"▸\";\n",
       "  float: left;\n",
       "  margin-right: 0.25em;\n",
       "  color: var(--sklearn-color-icon);\n",
       "}\n",
       "\n",
       "#sk-container-id-2 label.sk-toggleable__label-arrow:hover:before {\n",
       "  color: var(--sklearn-color-text);\n",
       "}\n",
       "\n",
       "/* Toggleable content - dropdown */\n",
       "\n",
       "#sk-container-id-2 div.sk-toggleable__content {\n",
       "  max-height: 0;\n",
       "  max-width: 0;\n",
       "  overflow: hidden;\n",
       "  text-align: left;\n",
       "  /* unfitted */\n",
       "  background-color: var(--sklearn-color-unfitted-level-0);\n",
       "}\n",
       "\n",
       "#sk-container-id-2 div.sk-toggleable__content.fitted {\n",
       "  /* fitted */\n",
       "  background-color: var(--sklearn-color-fitted-level-0);\n",
       "}\n",
       "\n",
       "#sk-container-id-2 div.sk-toggleable__content pre {\n",
       "  margin: 0.2em;\n",
       "  border-radius: 0.25em;\n",
       "  color: var(--sklearn-color-text);\n",
       "  /* unfitted */\n",
       "  background-color: var(--sklearn-color-unfitted-level-0);\n",
       "}\n",
       "\n",
       "#sk-container-id-2 div.sk-toggleable__content.fitted pre {\n",
       "  /* unfitted */\n",
       "  background-color: var(--sklearn-color-fitted-level-0);\n",
       "}\n",
       "\n",
       "#sk-container-id-2 input.sk-toggleable__control:checked~div.sk-toggleable__content {\n",
       "  /* Expand drop-down */\n",
       "  max-height: 200px;\n",
       "  max-width: 100%;\n",
       "  overflow: auto;\n",
       "}\n",
       "\n",
       "#sk-container-id-2 input.sk-toggleable__control:checked~label.sk-toggleable__label-arrow:before {\n",
       "  content: \"▾\";\n",
       "}\n",
       "\n",
       "/* Pipeline/ColumnTransformer-specific style */\n",
       "\n",
       "#sk-container-id-2 div.sk-label input.sk-toggleable__control:checked~label.sk-toggleable__label {\n",
       "  color: var(--sklearn-color-text);\n",
       "  background-color: var(--sklearn-color-unfitted-level-2);\n",
       "}\n",
       "\n",
       "#sk-container-id-2 div.sk-label.fitted input.sk-toggleable__control:checked~label.sk-toggleable__label {\n",
       "  background-color: var(--sklearn-color-fitted-level-2);\n",
       "}\n",
       "\n",
       "/* Estimator-specific style */\n",
       "\n",
       "/* Colorize estimator box */\n",
       "#sk-container-id-2 div.sk-estimator input.sk-toggleable__control:checked~label.sk-toggleable__label {\n",
       "  /* unfitted */\n",
       "  background-color: var(--sklearn-color-unfitted-level-2);\n",
       "}\n",
       "\n",
       "#sk-container-id-2 div.sk-estimator.fitted input.sk-toggleable__control:checked~label.sk-toggleable__label {\n",
       "  /* fitted */\n",
       "  background-color: var(--sklearn-color-fitted-level-2);\n",
       "}\n",
       "\n",
       "#sk-container-id-2 div.sk-label label.sk-toggleable__label,\n",
       "#sk-container-id-2 div.sk-label label {\n",
       "  /* The background is the default theme color */\n",
       "  color: var(--sklearn-color-text-on-default-background);\n",
       "}\n",
       "\n",
       "/* On hover, darken the color of the background */\n",
       "#sk-container-id-2 div.sk-label:hover label.sk-toggleable__label {\n",
       "  color: var(--sklearn-color-text);\n",
       "  background-color: var(--sklearn-color-unfitted-level-2);\n",
       "}\n",
       "\n",
       "/* Label box, darken color on hover, fitted */\n",
       "#sk-container-id-2 div.sk-label.fitted:hover label.sk-toggleable__label.fitted {\n",
       "  color: var(--sklearn-color-text);\n",
       "  background-color: var(--sklearn-color-fitted-level-2);\n",
       "}\n",
       "\n",
       "/* Estimator label */\n",
       "\n",
       "#sk-container-id-2 div.sk-label label {\n",
       "  font-family: monospace;\n",
       "  font-weight: bold;\n",
       "  display: inline-block;\n",
       "  line-height: 1.2em;\n",
       "}\n",
       "\n",
       "#sk-container-id-2 div.sk-label-container {\n",
       "  text-align: center;\n",
       "}\n",
       "\n",
       "/* Estimator-specific */\n",
       "#sk-container-id-2 div.sk-estimator {\n",
       "  font-family: monospace;\n",
       "  border: 1px dotted var(--sklearn-color-border-box);\n",
       "  border-radius: 0.25em;\n",
       "  box-sizing: border-box;\n",
       "  margin-bottom: 0.5em;\n",
       "  /* unfitted */\n",
       "  background-color: var(--sklearn-color-unfitted-level-0);\n",
       "}\n",
       "\n",
       "#sk-container-id-2 div.sk-estimator.fitted {\n",
       "  /* fitted */\n",
       "  background-color: var(--sklearn-color-fitted-level-0);\n",
       "}\n",
       "\n",
       "/* on hover */\n",
       "#sk-container-id-2 div.sk-estimator:hover {\n",
       "  /* unfitted */\n",
       "  background-color: var(--sklearn-color-unfitted-level-2);\n",
       "}\n",
       "\n",
       "#sk-container-id-2 div.sk-estimator.fitted:hover {\n",
       "  /* fitted */\n",
       "  background-color: var(--sklearn-color-fitted-level-2);\n",
       "}\n",
       "\n",
       "/* Specification for estimator info (e.g. \"i\" and \"?\") */\n",
       "\n",
       "/* Common style for \"i\" and \"?\" */\n",
       "\n",
       ".sk-estimator-doc-link,\n",
       "a:link.sk-estimator-doc-link,\n",
       "a:visited.sk-estimator-doc-link {\n",
       "  float: right;\n",
       "  font-size: smaller;\n",
       "  line-height: 1em;\n",
       "  font-family: monospace;\n",
       "  background-color: var(--sklearn-color-background);\n",
       "  border-radius: 1em;\n",
       "  height: 1em;\n",
       "  width: 1em;\n",
       "  text-decoration: none !important;\n",
       "  margin-left: 1ex;\n",
       "  /* unfitted */\n",
       "  border: var(--sklearn-color-unfitted-level-1) 1pt solid;\n",
       "  color: var(--sklearn-color-unfitted-level-1);\n",
       "}\n",
       "\n",
       ".sk-estimator-doc-link.fitted,\n",
       "a:link.sk-estimator-doc-link.fitted,\n",
       "a:visited.sk-estimator-doc-link.fitted {\n",
       "  /* fitted */\n",
       "  border: var(--sklearn-color-fitted-level-1) 1pt solid;\n",
       "  color: var(--sklearn-color-fitted-level-1);\n",
       "}\n",
       "\n",
       "/* On hover */\n",
       "div.sk-estimator:hover .sk-estimator-doc-link:hover,\n",
       ".sk-estimator-doc-link:hover,\n",
       "div.sk-label-container:hover .sk-estimator-doc-link:hover,\n",
       ".sk-estimator-doc-link:hover {\n",
       "  /* unfitted */\n",
       "  background-color: var(--sklearn-color-unfitted-level-3);\n",
       "  color: var(--sklearn-color-background);\n",
       "  text-decoration: none;\n",
       "}\n",
       "\n",
       "div.sk-estimator.fitted:hover .sk-estimator-doc-link.fitted:hover,\n",
       ".sk-estimator-doc-link.fitted:hover,\n",
       "div.sk-label-container:hover .sk-estimator-doc-link.fitted:hover,\n",
       ".sk-estimator-doc-link.fitted:hover {\n",
       "  /* fitted */\n",
       "  background-color: var(--sklearn-color-fitted-level-3);\n",
       "  color: var(--sklearn-color-background);\n",
       "  text-decoration: none;\n",
       "}\n",
       "\n",
       "/* Span, style for the box shown on hovering the info icon */\n",
       ".sk-estimator-doc-link span {\n",
       "  display: none;\n",
       "  z-index: 9999;\n",
       "  position: relative;\n",
       "  font-weight: normal;\n",
       "  right: .2ex;\n",
       "  padding: .5ex;\n",
       "  margin: .5ex;\n",
       "  width: min-content;\n",
       "  min-width: 20ex;\n",
       "  max-width: 50ex;\n",
       "  color: var(--sklearn-color-text);\n",
       "  box-shadow: 2pt 2pt 4pt #999;\n",
       "  /* unfitted */\n",
       "  background: var(--sklearn-color-unfitted-level-0);\n",
       "  border: .5pt solid var(--sklearn-color-unfitted-level-3);\n",
       "}\n",
       "\n",
       ".sk-estimator-doc-link.fitted span {\n",
       "  /* fitted */\n",
       "  background: var(--sklearn-color-fitted-level-0);\n",
       "  border: var(--sklearn-color-fitted-level-3);\n",
       "}\n",
       "\n",
       ".sk-estimator-doc-link:hover span {\n",
       "  display: block;\n",
       "}\n",
       "\n",
       "/* \"?\"-specific style due to the `<a>` HTML tag */\n",
       "\n",
       "#sk-container-id-2 a.estimator_doc_link {\n",
       "  float: right;\n",
       "  font-size: 1rem;\n",
       "  line-height: 1em;\n",
       "  font-family: monospace;\n",
       "  background-color: var(--sklearn-color-background);\n",
       "  border-radius: 1rem;\n",
       "  height: 1rem;\n",
       "  width: 1rem;\n",
       "  text-decoration: none;\n",
       "  /* unfitted */\n",
       "  color: var(--sklearn-color-unfitted-level-1);\n",
       "  border: var(--sklearn-color-unfitted-level-1) 1pt solid;\n",
       "}\n",
       "\n",
       "#sk-container-id-2 a.estimator_doc_link.fitted {\n",
       "  /* fitted */\n",
       "  border: var(--sklearn-color-fitted-level-1) 1pt solid;\n",
       "  color: var(--sklearn-color-fitted-level-1);\n",
       "}\n",
       "\n",
       "/* On hover */\n",
       "#sk-container-id-2 a.estimator_doc_link:hover {\n",
       "  /* unfitted */\n",
       "  background-color: var(--sklearn-color-unfitted-level-3);\n",
       "  color: var(--sklearn-color-background);\n",
       "  text-decoration: none;\n",
       "}\n",
       "\n",
       "#sk-container-id-2 a.estimator_doc_link.fitted:hover {\n",
       "  /* fitted */\n",
       "  background-color: var(--sklearn-color-fitted-level-3);\n",
       "}\n",
       "</style><div id=\"sk-container-id-2\" class=\"sk-top-container\"><div class=\"sk-text-repr-fallback\"><pre>TPOTEstimator(classification=True, generations=2, max_eval_time_mins=300,\n",
       "              n_jobs=10, population_size=10, scorers=[&#x27;roc_auc&#x27;],\n",
       "              scorers_weights=[1],\n",
       "              search_space=&lt;tpot.search_spaces.pipelines.sequential.SequentialPipeline object at 0x7d34ec1efbb0&gt;,\n",
       "              verbose=5)</pre><b>In a Jupyter environment, please rerun this cell to show the HTML representation or trust the notebook. <br />On GitHub, the HTML representation is unable to render, please try loading this page with nbviewer.org.</b></div><div class=\"sk-container\" hidden><div class=\"sk-item\"><div class=\"sk-estimator fitted sk-toggleable\"><input class=\"sk-toggleable__control sk-hidden--visually\" id=\"sk-estimator-id-18\" type=\"checkbox\" checked><label for=\"sk-estimator-id-18\" class=\"sk-toggleable__label fitted sk-toggleable__label-arrow fitted\">&nbsp;TPOTEstimator<span class=\"sk-estimator-doc-link fitted\">i<span>Fitted</span></span></label><div class=\"sk-toggleable__content fitted\"><pre>TPOTEstimator(classification=True, generations=2, max_eval_time_mins=300,\n",
       "              n_jobs=10, population_size=10, scorers=[&#x27;roc_auc&#x27;],\n",
       "              scorers_weights=[1],\n",
       "              search_space=&lt;tpot.search_spaces.pipelines.sequential.SequentialPipeline object at 0x7d34ec1efbb0&gt;,\n",
       "              verbose=5)</pre></div> </div></div></div></div>"
      ],
      "text/plain": [
       "TPOTEstimator(classification=True, generations=2, max_eval_time_mins=300,\n",
       "              n_jobs=10, population_size=10, scorers=['roc_auc'],\n",
       "              scorers_weights=[1],\n",
       "              search_space=<tpot.search_spaces.pipelines.sequential.SequentialPipeline object at 0x7d34ec1efbb0>,\n",
       "              verbose=5)"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "\n",
    "\n",
    "\n",
    "est = tpot.TPOTEstimator(\n",
    "    scorers = [\"roc_auc\"],\n",
    "    scorers_weights = [1],\n",
    "    classification = True,\n",
    "    cv = 5,\n",
    "    search_space = tpot_search_space, #converted search space goes here\n",
    "    population_size= 10,\n",
    "    generations = 2,\n",
    "    max_eval_time_mins = 60*5,\n",
    "    verbose = 5,\n",
    "    n_jobs=10,\n",
    ")\n",
    "\n",
    "est.fit(X_train, y_train)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<style>#sk-container-id-3 {\n",
       "  /* Definition of color scheme common for light and dark mode */\n",
       "  --sklearn-color-text: black;\n",
       "  --sklearn-color-line: gray;\n",
       "  /* Definition of color scheme for unfitted estimators */\n",
       "  --sklearn-color-unfitted-level-0: #fff5e6;\n",
       "  --sklearn-color-unfitted-level-1: #f6e4d2;\n",
       "  --sklearn-color-unfitted-level-2: #ffe0b3;\n",
       "  --sklearn-color-unfitted-level-3: chocolate;\n",
       "  /* Definition of color scheme for fitted estimators */\n",
       "  --sklearn-color-fitted-level-0: #f0f8ff;\n",
       "  --sklearn-color-fitted-level-1: #d4ebff;\n",
       "  --sklearn-color-fitted-level-2: #b3dbfd;\n",
       "  --sklearn-color-fitted-level-3: cornflowerblue;\n",
       "\n",
       "  /* Specific color for light theme */\n",
       "  --sklearn-color-text-on-default-background: var(--sg-text-color, var(--theme-code-foreground, var(--jp-content-font-color1, black)));\n",
       "  --sklearn-color-background: var(--sg-background-color, var(--theme-background, var(--jp-layout-color0, white)));\n",
       "  --sklearn-color-border-box: var(--sg-text-color, var(--theme-code-foreground, var(--jp-content-font-color1, black)));\n",
       "  --sklearn-color-icon: #696969;\n",
       "\n",
       "  @media (prefers-color-scheme: dark) {\n",
       "    /* Redefinition of color scheme for dark theme */\n",
       "    --sklearn-color-text-on-default-background: var(--sg-text-color, var(--theme-code-foreground, var(--jp-content-font-color1, white)));\n",
       "    --sklearn-color-background: var(--sg-background-color, var(--theme-background, var(--jp-layout-color0, #111)));\n",
       "    --sklearn-color-border-box: var(--sg-text-color, var(--theme-code-foreground, var(--jp-content-font-color1, white)));\n",
       "    --sklearn-color-icon: #878787;\n",
       "  }\n",
       "}\n",
       "\n",
       "#sk-container-id-3 {\n",
       "  color: var(--sklearn-color-text);\n",
       "}\n",
       "\n",
       "#sk-container-id-3 pre {\n",
       "  padding: 0;\n",
       "}\n",
       "\n",
       "#sk-container-id-3 input.sk-hidden--visually {\n",
       "  border: 0;\n",
       "  clip: rect(1px 1px 1px 1px);\n",
       "  clip: rect(1px, 1px, 1px, 1px);\n",
       "  height: 1px;\n",
       "  margin: -1px;\n",
       "  overflow: hidden;\n",
       "  padding: 0;\n",
       "  position: absolute;\n",
       "  width: 1px;\n",
       "}\n",
       "\n",
       "#sk-container-id-3 div.sk-dashed-wrapped {\n",
       "  border: 1px dashed var(--sklearn-color-line);\n",
       "  margin: 0 0.4em 0.5em 0.4em;\n",
       "  box-sizing: border-box;\n",
       "  padding-bottom: 0.4em;\n",
       "  background-color: var(--sklearn-color-background);\n",
       "}\n",
       "\n",
       "#sk-container-id-3 div.sk-container {\n",
       "  /* jupyter's `normalize.less` sets `[hidden] { display: none; }`\n",
       "     but bootstrap.min.css set `[hidden] { display: none !important; }`\n",
       "     so we also need the `!important` here to be able to override the\n",
       "     default hidden behavior on the sphinx rendered scikit-learn.org.\n",
       "     See: https://github.com/scikit-learn/scikit-learn/issues/21755 */\n",
       "  display: inline-block !important;\n",
       "  position: relative;\n",
       "}\n",
       "\n",
       "#sk-container-id-3 div.sk-text-repr-fallback {\n",
       "  display: none;\n",
       "}\n",
       "\n",
       "div.sk-parallel-item,\n",
       "div.sk-serial,\n",
       "div.sk-item {\n",
       "  /* draw centered vertical line to link estimators */\n",
       "  background-image: linear-gradient(var(--sklearn-color-text-on-default-background), var(--sklearn-color-text-on-default-background));\n",
       "  background-size: 2px 100%;\n",
       "  background-repeat: no-repeat;\n",
       "  background-position: center center;\n",
       "}\n",
       "\n",
       "/* Parallel-specific style estimator block */\n",
       "\n",
       "#sk-container-id-3 div.sk-parallel-item::after {\n",
       "  content: \"\";\n",
       "  width: 100%;\n",
       "  border-bottom: 2px solid var(--sklearn-color-text-on-default-background);\n",
       "  flex-grow: 1;\n",
       "}\n",
       "\n",
       "#sk-container-id-3 div.sk-parallel {\n",
       "  display: flex;\n",
       "  align-items: stretch;\n",
       "  justify-content: center;\n",
       "  background-color: var(--sklearn-color-background);\n",
       "  position: relative;\n",
       "}\n",
       "\n",
       "#sk-container-id-3 div.sk-parallel-item {\n",
       "  display: flex;\n",
       "  flex-direction: column;\n",
       "}\n",
       "\n",
       "#sk-container-id-3 div.sk-parallel-item:first-child::after {\n",
       "  align-self: flex-end;\n",
       "  width: 50%;\n",
       "}\n",
       "\n",
       "#sk-container-id-3 div.sk-parallel-item:last-child::after {\n",
       "  align-self: flex-start;\n",
       "  width: 50%;\n",
       "}\n",
       "\n",
       "#sk-container-id-3 div.sk-parallel-item:only-child::after {\n",
       "  width: 0;\n",
       "}\n",
       "\n",
       "/* Serial-specific style estimator block */\n",
       "\n",
       "#sk-container-id-3 div.sk-serial {\n",
       "  display: flex;\n",
       "  flex-direction: column;\n",
       "  align-items: center;\n",
       "  background-color: var(--sklearn-color-background);\n",
       "  padding-right: 1em;\n",
       "  padding-left: 1em;\n",
       "}\n",
       "\n",
       "\n",
       "/* Toggleable style: style used for estimator/Pipeline/ColumnTransformer box that is\n",
       "clickable and can be expanded/collapsed.\n",
       "- Pipeline and ColumnTransformer use this feature and define the default style\n",
       "- Estimators will overwrite some part of the style using the `sk-estimator` class\n",
       "*/\n",
       "\n",
       "/* Pipeline and ColumnTransformer style (default) */\n",
       "\n",
       "#sk-container-id-3 div.sk-toggleable {\n",
       "  /* Default theme specific background. It is overwritten whether we have a\n",
       "  specific estimator or a Pipeline/ColumnTransformer */\n",
       "  background-color: var(--sklearn-color-background);\n",
       "}\n",
       "\n",
       "/* Toggleable label */\n",
       "#sk-container-id-3 label.sk-toggleable__label {\n",
       "  cursor: pointer;\n",
       "  display: block;\n",
       "  width: 100%;\n",
       "  margin-bottom: 0;\n",
       "  padding: 0.5em;\n",
       "  box-sizing: border-box;\n",
       "  text-align: center;\n",
       "}\n",
       "\n",
       "#sk-container-id-3 label.sk-toggleable__label-arrow:before {\n",
       "  /* Arrow on the left of the label */\n",
       "  content: \"▸\";\n",
       "  float: left;\n",
       "  margin-right: 0.25em;\n",
       "  color: var(--sklearn-color-icon);\n",
       "}\n",
       "\n",
       "#sk-container-id-3 label.sk-toggleable__label-arrow:hover:before {\n",
       "  color: var(--sklearn-color-text);\n",
       "}\n",
       "\n",
       "/* Toggleable content - dropdown */\n",
       "\n",
       "#sk-container-id-3 div.sk-toggleable__content {\n",
       "  max-height: 0;\n",
       "  max-width: 0;\n",
       "  overflow: hidden;\n",
       "  text-align: left;\n",
       "  /* unfitted */\n",
       "  background-color: var(--sklearn-color-unfitted-level-0);\n",
       "}\n",
       "\n",
       "#sk-container-id-3 div.sk-toggleable__content.fitted {\n",
       "  /* fitted */\n",
       "  background-color: var(--sklearn-color-fitted-level-0);\n",
       "}\n",
       "\n",
       "#sk-container-id-3 div.sk-toggleable__content pre {\n",
       "  margin: 0.2em;\n",
       "  border-radius: 0.25em;\n",
       "  color: var(--sklearn-color-text);\n",
       "  /* unfitted */\n",
       "  background-color: var(--sklearn-color-unfitted-level-0);\n",
       "}\n",
       "\n",
       "#sk-container-id-3 div.sk-toggleable__content.fitted pre {\n",
       "  /* unfitted */\n",
       "  background-color: var(--sklearn-color-fitted-level-0);\n",
       "}\n",
       "\n",
       "#sk-container-id-3 input.sk-toggleable__control:checked~div.sk-toggleable__content {\n",
       "  /* Expand drop-down */\n",
       "  max-height: 200px;\n",
       "  max-width: 100%;\n",
       "  overflow: auto;\n",
       "}\n",
       "\n",
       "#sk-container-id-3 input.sk-toggleable__control:checked~label.sk-toggleable__label-arrow:before {\n",
       "  content: \"▾\";\n",
       "}\n",
       "\n",
       "/* Pipeline/ColumnTransformer-specific style */\n",
       "\n",
       "#sk-container-id-3 div.sk-label input.sk-toggleable__control:checked~label.sk-toggleable__label {\n",
       "  color: var(--sklearn-color-text);\n",
       "  background-color: var(--sklearn-color-unfitted-level-2);\n",
       "}\n",
       "\n",
       "#sk-container-id-3 div.sk-label.fitted input.sk-toggleable__control:checked~label.sk-toggleable__label {\n",
       "  background-color: var(--sklearn-color-fitted-level-2);\n",
       "}\n",
       "\n",
       "/* Estimator-specific style */\n",
       "\n",
       "/* Colorize estimator box */\n",
       "#sk-container-id-3 div.sk-estimator input.sk-toggleable__control:checked~label.sk-toggleable__label {\n",
       "  /* unfitted */\n",
       "  background-color: var(--sklearn-color-unfitted-level-2);\n",
       "}\n",
       "\n",
       "#sk-container-id-3 div.sk-estimator.fitted input.sk-toggleable__control:checked~label.sk-toggleable__label {\n",
       "  /* fitted */\n",
       "  background-color: var(--sklearn-color-fitted-level-2);\n",
       "}\n",
       "\n",
       "#sk-container-id-3 div.sk-label label.sk-toggleable__label,\n",
       "#sk-container-id-3 div.sk-label label {\n",
       "  /* The background is the default theme color */\n",
       "  color: var(--sklearn-color-text-on-default-background);\n",
       "}\n",
       "\n",
       "/* On hover, darken the color of the background */\n",
       "#sk-container-id-3 div.sk-label:hover label.sk-toggleable__label {\n",
       "  color: var(--sklearn-color-text);\n",
       "  background-color: var(--sklearn-color-unfitted-level-2);\n",
       "}\n",
       "\n",
       "/* Label box, darken color on hover, fitted */\n",
       "#sk-container-id-3 div.sk-label.fitted:hover label.sk-toggleable__label.fitted {\n",
       "  color: var(--sklearn-color-text);\n",
       "  background-color: var(--sklearn-color-fitted-level-2);\n",
       "}\n",
       "\n",
       "/* Estimator label */\n",
       "\n",
       "#sk-container-id-3 div.sk-label label {\n",
       "  font-family: monospace;\n",
       "  font-weight: bold;\n",
       "  display: inline-block;\n",
       "  line-height: 1.2em;\n",
       "}\n",
       "\n",
       "#sk-container-id-3 div.sk-label-container {\n",
       "  text-align: center;\n",
       "}\n",
       "\n",
       "/* Estimator-specific */\n",
       "#sk-container-id-3 div.sk-estimator {\n",
       "  font-family: monospace;\n",
       "  border: 1px dotted var(--sklearn-color-border-box);\n",
       "  border-radius: 0.25em;\n",
       "  box-sizing: border-box;\n",
       "  margin-bottom: 0.5em;\n",
       "  /* unfitted */\n",
       "  background-color: var(--sklearn-color-unfitted-level-0);\n",
       "}\n",
       "\n",
       "#sk-container-id-3 div.sk-estimator.fitted {\n",
       "  /* fitted */\n",
       "  background-color: var(--sklearn-color-fitted-level-0);\n",
       "}\n",
       "\n",
       "/* on hover */\n",
       "#sk-container-id-3 div.sk-estimator:hover {\n",
       "  /* unfitted */\n",
       "  background-color: var(--sklearn-color-unfitted-level-2);\n",
       "}\n",
       "\n",
       "#sk-container-id-3 div.sk-estimator.fitted:hover {\n",
       "  /* fitted */\n",
       "  background-color: var(--sklearn-color-fitted-level-2);\n",
       "}\n",
       "\n",
       "/* Specification for estimator info (e.g. \"i\" and \"?\") */\n",
       "\n",
       "/* Common style for \"i\" and \"?\" */\n",
       "\n",
       ".sk-estimator-doc-link,\n",
       "a:link.sk-estimator-doc-link,\n",
       "a:visited.sk-estimator-doc-link {\n",
       "  float: right;\n",
       "  font-size: smaller;\n",
       "  line-height: 1em;\n",
       "  font-family: monospace;\n",
       "  background-color: var(--sklearn-color-background);\n",
       "  border-radius: 1em;\n",
       "  height: 1em;\n",
       "  width: 1em;\n",
       "  text-decoration: none !important;\n",
       "  margin-left: 1ex;\n",
       "  /* unfitted */\n",
       "  border: var(--sklearn-color-unfitted-level-1) 1pt solid;\n",
       "  color: var(--sklearn-color-unfitted-level-1);\n",
       "}\n",
       "\n",
       ".sk-estimator-doc-link.fitted,\n",
       "a:link.sk-estimator-doc-link.fitted,\n",
       "a:visited.sk-estimator-doc-link.fitted {\n",
       "  /* fitted */\n",
       "  border: var(--sklearn-color-fitted-level-1) 1pt solid;\n",
       "  color: var(--sklearn-color-fitted-level-1);\n",
       "}\n",
       "\n",
       "/* On hover */\n",
       "div.sk-estimator:hover .sk-estimator-doc-link:hover,\n",
       ".sk-estimator-doc-link:hover,\n",
       "div.sk-label-container:hover .sk-estimator-doc-link:hover,\n",
       ".sk-estimator-doc-link:hover {\n",
       "  /* unfitted */\n",
       "  background-color: var(--sklearn-color-unfitted-level-3);\n",
       "  color: var(--sklearn-color-background);\n",
       "  text-decoration: none;\n",
       "}\n",
       "\n",
       "div.sk-estimator.fitted:hover .sk-estimator-doc-link.fitted:hover,\n",
       ".sk-estimator-doc-link.fitted:hover,\n",
       "div.sk-label-container:hover .sk-estimator-doc-link.fitted:hover,\n",
       ".sk-estimator-doc-link.fitted:hover {\n",
       "  /* fitted */\n",
       "  background-color: var(--sklearn-color-fitted-level-3);\n",
       "  color: var(--sklearn-color-background);\n",
       "  text-decoration: none;\n",
       "}\n",
       "\n",
       "/* Span, style for the box shown on hovering the info icon */\n",
       ".sk-estimator-doc-link span {\n",
       "  display: none;\n",
       "  z-index: 9999;\n",
       "  position: relative;\n",
       "  font-weight: normal;\n",
       "  right: .2ex;\n",
       "  padding: .5ex;\n",
       "  margin: .5ex;\n",
       "  width: min-content;\n",
       "  min-width: 20ex;\n",
       "  max-width: 50ex;\n",
       "  color: var(--sklearn-color-text);\n",
       "  box-shadow: 2pt 2pt 4pt #999;\n",
       "  /* unfitted */\n",
       "  background: var(--sklearn-color-unfitted-level-0);\n",
       "  border: .5pt solid var(--sklearn-color-unfitted-level-3);\n",
       "}\n",
       "\n",
       ".sk-estimator-doc-link.fitted span {\n",
       "  /* fitted */\n",
       "  background: var(--sklearn-color-fitted-level-0);\n",
       "  border: var(--sklearn-color-fitted-level-3);\n",
       "}\n",
       "\n",
       ".sk-estimator-doc-link:hover span {\n",
       "  display: block;\n",
       "}\n",
       "\n",
       "/* \"?\"-specific style due to the `<a>` HTML tag */\n",
       "\n",
       "#sk-container-id-3 a.estimator_doc_link {\n",
       "  float: right;\n",
       "  font-size: 1rem;\n",
       "  line-height: 1em;\n",
       "  font-family: monospace;\n",
       "  background-color: var(--sklearn-color-background);\n",
       "  border-radius: 1rem;\n",
       "  height: 1rem;\n",
       "  width: 1rem;\n",
       "  text-decoration: none;\n",
       "  /* unfitted */\n",
       "  color: var(--sklearn-color-unfitted-level-1);\n",
       "  border: var(--sklearn-color-unfitted-level-1) 1pt solid;\n",
       "}\n",
       "\n",
       "#sk-container-id-3 a.estimator_doc_link.fitted {\n",
       "  /* fitted */\n",
       "  border: var(--sklearn-color-fitted-level-1) 1pt solid;\n",
       "  color: var(--sklearn-color-fitted-level-1);\n",
       "}\n",
       "\n",
       "/* On hover */\n",
       "#sk-container-id-3 a.estimator_doc_link:hover {\n",
       "  /* unfitted */\n",
       "  background-color: var(--sklearn-color-unfitted-level-3);\n",
       "  color: var(--sklearn-color-background);\n",
       "  text-decoration: none;\n",
       "}\n",
       "\n",
       "#sk-container-id-3 a.estimator_doc_link.fitted:hover {\n",
       "  /* fitted */\n",
       "  background-color: var(--sklearn-color-fitted-level-3);\n",
       "}\n",
       "</style><div id=\"sk-container-id-3\" class=\"sk-top-container\"><div class=\"sk-text-repr-fallback\"><pre>Pipeline(steps=[(&#x27;featureunion-1&#x27;,\n",
       "                 FeatureUnion(transformer_list=[(&#x27;pipeline-1&#x27;,\n",
       "                                                 Pipeline(steps=[(&#x27;columntransformer&#x27;,\n",
       "                                                                  ColumnTransformer(transformers=[(&#x27;passthrough&#x27;,\n",
       "                                                                                                   &#x27;passthrough&#x27;,\n",
       "                                                                                                   &lt;sklearn.compose._column_transformer.make_column_selector object at 0x7d34eb307cd0&gt;)])),\n",
       "                                                                 (&#x27;simpleimputer&#x27;,\n",
       "                                                                  SimpleImputer(fill_value=&#x27;missing&#x27;,\n",
       "                                                                                strategy=&#x27;constant&#x27;)),\n",
       "                                                                 (&#x27;onehotencode...\n",
       "                 VarianceThreshold(threshold=0.1557560591318)),\n",
       "                (&#x27;featureunion-2&#x27;,\n",
       "                 FeatureUnion(transformer_list=[(&#x27;pipeline-1&#x27;,\n",
       "                                                 Pipeline(steps=[(&#x27;passthrough&#x27;,\n",
       "                                                                  Passthrough())])),\n",
       "                                                (&#x27;pipeline-2&#x27;,\n",
       "                                                 Pipeline(steps=[(&#x27;polynomialfeatures&#x27;,\n",
       "                                                                  PolynomialFeatures())])),\n",
       "                                                (&#x27;pipeline-3&#x27;,\n",
       "                                                 Pipeline(steps=[(&#x27;zerocount&#x27;,\n",
       "                                                                  ZeroCount())]))])),\n",
       "                (&#x27;randomforestclassifier&#x27;,\n",
       "                 RandomForestClassifier(criterion=&#x27;log_loss&#x27;,\n",
       "                                        n_estimators=80))])</pre><b>In a Jupyter environment, please rerun this cell to show the HTML representation or trust the notebook. <br />On GitHub, the HTML representation is unable to render, please try loading this page with nbviewer.org.</b></div><div class=\"sk-container\" hidden><div class=\"sk-item sk-dashed-wrapped\"><div class=\"sk-label-container\"><div class=\"sk-label fitted sk-toggleable\"><input class=\"sk-toggleable__control sk-hidden--visually\" id=\"sk-estimator-id-19\" type=\"checkbox\" ><label for=\"sk-estimator-id-19\" class=\"sk-toggleable__label fitted sk-toggleable__label-arrow fitted\">&nbsp;&nbsp;Pipeline<a class=\"sk-estimator-doc-link fitted\" rel=\"noreferrer\" target=\"_blank\" href=\"https://scikit-learn.org/1.4/modules/generated/sklearn.pipeline.Pipeline.html\">?<span>Documentation for Pipeline</span></a><span class=\"sk-estimator-doc-link fitted\">i<span>Fitted</span></span></label><div class=\"sk-toggleable__content fitted\"><pre>Pipeline(steps=[(&#x27;featureunion-1&#x27;,\n",
       "                 FeatureUnion(transformer_list=[(&#x27;pipeline-1&#x27;,\n",
       "                                                 Pipeline(steps=[(&#x27;columntransformer&#x27;,\n",
       "                                                                  ColumnTransformer(transformers=[(&#x27;passthrough&#x27;,\n",
       "                                                                                                   &#x27;passthrough&#x27;,\n",
       "                                                                                                   &lt;sklearn.compose._column_transformer.make_column_selector object at 0x7d34eb307cd0&gt;)])),\n",
       "                                                                 (&#x27;simpleimputer&#x27;,\n",
       "                                                                  SimpleImputer(fill_value=&#x27;missing&#x27;,\n",
       "                                                                                strategy=&#x27;constant&#x27;)),\n",
       "                                                                 (&#x27;onehotencode...\n",
       "                 VarianceThreshold(threshold=0.1557560591318)),\n",
       "                (&#x27;featureunion-2&#x27;,\n",
       "                 FeatureUnion(transformer_list=[(&#x27;pipeline-1&#x27;,\n",
       "                                                 Pipeline(steps=[(&#x27;passthrough&#x27;,\n",
       "                                                                  Passthrough())])),\n",
       "                                                (&#x27;pipeline-2&#x27;,\n",
       "                                                 Pipeline(steps=[(&#x27;polynomialfeatures&#x27;,\n",
       "                                                                  PolynomialFeatures())])),\n",
       "                                                (&#x27;pipeline-3&#x27;,\n",
       "                                                 Pipeline(steps=[(&#x27;zerocount&#x27;,\n",
       "                                                                  ZeroCount())]))])),\n",
       "                (&#x27;randomforestclassifier&#x27;,\n",
       "                 RandomForestClassifier(criterion=&#x27;log_loss&#x27;,\n",
       "                                        n_estimators=80))])</pre></div> </div></div><div class=\"sk-serial\"><div class=\"sk-item sk-dashed-wrapped\"><div class=\"sk-label-container\"><div class=\"sk-label fitted sk-toggleable\"><input class=\"sk-toggleable__control sk-hidden--visually\" id=\"sk-estimator-id-20\" type=\"checkbox\" ><label for=\"sk-estimator-id-20\" class=\"sk-toggleable__label fitted sk-toggleable__label-arrow fitted\">&nbsp;featureunion-1: FeatureUnion<a class=\"sk-estimator-doc-link fitted\" rel=\"noreferrer\" target=\"_blank\" href=\"https://scikit-learn.org/1.4/modules/generated/sklearn.pipeline.FeatureUnion.html\">?<span>Documentation for featureunion-1: FeatureUnion</span></a></label><div class=\"sk-toggleable__content fitted\"><pre>FeatureUnion(transformer_list=[(&#x27;pipeline-1&#x27;,\n",
       "                                Pipeline(steps=[(&#x27;columntransformer&#x27;,\n",
       "                                                 ColumnTransformer(transformers=[(&#x27;passthrough&#x27;,\n",
       "                                                                                  &#x27;passthrough&#x27;,\n",
       "                                                                                  &lt;sklearn.compose._column_transformer.make_column_selector object at 0x7d34eb307cd0&gt;)])),\n",
       "                                                (&#x27;simpleimputer&#x27;,\n",
       "                                                 SimpleImputer(fill_value=&#x27;missing&#x27;,\n",
       "                                                               strategy=&#x27;constant&#x27;)),\n",
       "                                                (&#x27;onehotencoder&#x27;,\n",
       "                                                 OneHotEncoder(drop=&#x27;first&#x27;,\n",
       "                                                               sparse_output=False))])),\n",
       "                               (&#x27;pipeline-2&#x27;,\n",
       "                                Pipeline(steps=[(&#x27;columntransformer&#x27;,\n",
       "                                                 ColumnTransformer(transformers=[(&#x27;passthrough&#x27;,\n",
       "                                                                                  &#x27;passthrough&#x27;,\n",
       "                                                                                  &lt;sklearn.compose._column_transformer.make_column_selector object at 0x7d34eb307d30&gt;)])),\n",
       "                                                (&#x27;simpleimputer&#x27;,\n",
       "                                                 SimpleImputer(strategy=&#x27;median&#x27;))]))])</pre></div> </div></div><div class=\"sk-parallel\"><div class=\"sk-parallel-item\"><div class=\"sk-item\"><div class=\"sk-label-container\"><div class=\"sk-label fitted sk-toggleable\"><label>pipeline-1</label></div></div><div class=\"sk-serial\"><div class=\"sk-item\"><div class=\"sk-serial\"><div class=\"sk-item sk-dashed-wrapped\"><div class=\"sk-label-container\"><div class=\"sk-label fitted sk-toggleable\"><input class=\"sk-toggleable__control sk-hidden--visually\" id=\"sk-estimator-id-21\" type=\"checkbox\" ><label for=\"sk-estimator-id-21\" class=\"sk-toggleable__label fitted sk-toggleable__label-arrow fitted\">&nbsp;columntransformer: ColumnTransformer<a class=\"sk-estimator-doc-link fitted\" rel=\"noreferrer\" target=\"_blank\" href=\"https://scikit-learn.org/1.4/modules/generated/sklearn.compose.ColumnTransformer.html\">?<span>Documentation for columntransformer: ColumnTransformer</span></a></label><div class=\"sk-toggleable__content fitted\"><pre>ColumnTransformer(transformers=[(&#x27;passthrough&#x27;, &#x27;passthrough&#x27;,\n",
       "                                 &lt;sklearn.compose._column_transformer.make_column_selector object at 0x7d34eb307cd0&gt;)])</pre></div> </div></div><div class=\"sk-parallel\"><div class=\"sk-parallel-item\"><div class=\"sk-item\"><div class=\"sk-label-container\"><div class=\"sk-label fitted sk-toggleable\"><input class=\"sk-toggleable__control sk-hidden--visually\" id=\"sk-estimator-id-22\" type=\"checkbox\" ><label for=\"sk-estimator-id-22\" class=\"sk-toggleable__label fitted sk-toggleable__label-arrow fitted\">passthrough</label><div class=\"sk-toggleable__content fitted\"><pre>&lt;sklearn.compose._column_transformer.make_column_selector object at 0x7d34eb307cd0&gt;</pre></div> </div></div><div class=\"sk-serial\"><div class=\"sk-item\"><div class=\"sk-estimator fitted sk-toggleable\"><input class=\"sk-toggleable__control sk-hidden--visually\" id=\"sk-estimator-id-23\" type=\"checkbox\" ><label for=\"sk-estimator-id-23\" class=\"sk-toggleable__label fitted sk-toggleable__label-arrow fitted\">passthrough</label><div class=\"sk-toggleable__content fitted\"><pre>passthrough</pre></div> </div></div></div></div></div></div></div><div class=\"sk-item\"><div class=\"sk-estimator fitted sk-toggleable\"><input class=\"sk-toggleable__control sk-hidden--visually\" id=\"sk-estimator-id-24\" type=\"checkbox\" ><label for=\"sk-estimator-id-24\" class=\"sk-toggleable__label fitted sk-toggleable__label-arrow fitted\">&nbsp;SimpleImputer<a class=\"sk-estimator-doc-link fitted\" rel=\"noreferrer\" target=\"_blank\" href=\"https://scikit-learn.org/1.4/modules/generated/sklearn.impute.SimpleImputer.html\">?<span>Documentation for SimpleImputer</span></a></label><div class=\"sk-toggleable__content fitted\"><pre>SimpleImputer(fill_value=&#x27;missing&#x27;, strategy=&#x27;constant&#x27;)</pre></div> </div></div><div class=\"sk-item\"><div class=\"sk-estimator fitted sk-toggleable\"><input class=\"sk-toggleable__control sk-hidden--visually\" id=\"sk-estimator-id-25\" type=\"checkbox\" ><label for=\"sk-estimator-id-25\" class=\"sk-toggleable__label fitted sk-toggleable__label-arrow fitted\">&nbsp;OneHotEncoder<a class=\"sk-estimator-doc-link fitted\" rel=\"noreferrer\" target=\"_blank\" href=\"https://scikit-learn.org/1.4/modules/generated/sklearn.preprocessing.OneHotEncoder.html\">?<span>Documentation for OneHotEncoder</span></a></label><div class=\"sk-toggleable__content fitted\"><pre>OneHotEncoder(drop=&#x27;first&#x27;, sparse_output=False)</pre></div> </div></div></div></div></div></div></div><div class=\"sk-parallel-item\"><div class=\"sk-item\"><div class=\"sk-label-container\"><div class=\"sk-label fitted sk-toggleable\"><label>pipeline-2</label></div></div><div class=\"sk-serial\"><div class=\"sk-item\"><div class=\"sk-serial\"><div class=\"sk-item sk-dashed-wrapped\"><div class=\"sk-label-container\"><div class=\"sk-label fitted sk-toggleable\"><input class=\"sk-toggleable__control sk-hidden--visually\" id=\"sk-estimator-id-26\" type=\"checkbox\" ><label for=\"sk-estimator-id-26\" class=\"sk-toggleable__label fitted sk-toggleable__label-arrow fitted\">&nbsp;columntransformer: ColumnTransformer<a class=\"sk-estimator-doc-link fitted\" rel=\"noreferrer\" target=\"_blank\" href=\"https://scikit-learn.org/1.4/modules/generated/sklearn.compose.ColumnTransformer.html\">?<span>Documentation for columntransformer: ColumnTransformer</span></a></label><div class=\"sk-toggleable__content fitted\"><pre>ColumnTransformer(transformers=[(&#x27;passthrough&#x27;, &#x27;passthrough&#x27;,\n",
       "                                 &lt;sklearn.compose._column_transformer.make_column_selector object at 0x7d34eb307d30&gt;)])</pre></div> </div></div><div class=\"sk-parallel\"><div class=\"sk-parallel-item\"><div class=\"sk-item\"><div class=\"sk-label-container\"><div class=\"sk-label fitted sk-toggleable\"><input class=\"sk-toggleable__control sk-hidden--visually\" id=\"sk-estimator-id-27\" type=\"checkbox\" ><label for=\"sk-estimator-id-27\" class=\"sk-toggleable__label fitted sk-toggleable__label-arrow fitted\">passthrough</label><div class=\"sk-toggleable__content fitted\"><pre>&lt;sklearn.compose._column_transformer.make_column_selector object at 0x7d34eb307d30&gt;</pre></div> </div></div><div class=\"sk-serial\"><div class=\"sk-item\"><div class=\"sk-estimator fitted sk-toggleable\"><input class=\"sk-toggleable__control sk-hidden--visually\" id=\"sk-estimator-id-28\" type=\"checkbox\" ><label for=\"sk-estimator-id-28\" class=\"sk-toggleable__label fitted sk-toggleable__label-arrow fitted\">passthrough</label><div class=\"sk-toggleable__content fitted\"><pre>passthrough</pre></div> </div></div></div></div></div></div></div><div class=\"sk-item\"><div class=\"sk-estimator fitted sk-toggleable\"><input class=\"sk-toggleable__control sk-hidden--visually\" id=\"sk-estimator-id-29\" type=\"checkbox\" ><label for=\"sk-estimator-id-29\" class=\"sk-toggleable__label fitted sk-toggleable__label-arrow fitted\">&nbsp;SimpleImputer<a class=\"sk-estimator-doc-link fitted\" rel=\"noreferrer\" target=\"_blank\" href=\"https://scikit-learn.org/1.4/modules/generated/sklearn.impute.SimpleImputer.html\">?<span>Documentation for SimpleImputer</span></a></label><div class=\"sk-toggleable__content fitted\"><pre>SimpleImputer(strategy=&#x27;median&#x27;)</pre></div> </div></div></div></div></div></div></div></div></div><div class=\"sk-item\"><div class=\"sk-estimator fitted sk-toggleable\"><input class=\"sk-toggleable__control sk-hidden--visually\" id=\"sk-estimator-id-30\" type=\"checkbox\" ><label for=\"sk-estimator-id-30\" class=\"sk-toggleable__label fitted sk-toggleable__label-arrow fitted\">&nbsp;VarianceThreshold<a class=\"sk-estimator-doc-link fitted\" rel=\"noreferrer\" target=\"_blank\" href=\"https://scikit-learn.org/1.4/modules/generated/sklearn.feature_selection.VarianceThreshold.html\">?<span>Documentation for VarianceThreshold</span></a></label><div class=\"sk-toggleable__content fitted\"><pre>VarianceThreshold(threshold=0.1557560591318)</pre></div> </div></div><div class=\"sk-item sk-dashed-wrapped\"><div class=\"sk-label-container\"><div class=\"sk-label fitted sk-toggleable\"><input class=\"sk-toggleable__control sk-hidden--visually\" id=\"sk-estimator-id-31\" type=\"checkbox\" ><label for=\"sk-estimator-id-31\" class=\"sk-toggleable__label fitted sk-toggleable__label-arrow fitted\">&nbsp;featureunion-2: FeatureUnion<a class=\"sk-estimator-doc-link fitted\" rel=\"noreferrer\" target=\"_blank\" href=\"https://scikit-learn.org/1.4/modules/generated/sklearn.pipeline.FeatureUnion.html\">?<span>Documentation for featureunion-2: FeatureUnion</span></a></label><div class=\"sk-toggleable__content fitted\"><pre>FeatureUnion(transformer_list=[(&#x27;pipeline-1&#x27;,\n",
       "                                Pipeline(steps=[(&#x27;passthrough&#x27;,\n",
       "                                                 Passthrough())])),\n",
       "                               (&#x27;pipeline-2&#x27;,\n",
       "                                Pipeline(steps=[(&#x27;polynomialfeatures&#x27;,\n",
       "                                                 PolynomialFeatures())])),\n",
       "                               (&#x27;pipeline-3&#x27;,\n",
       "                                Pipeline(steps=[(&#x27;zerocount&#x27;, ZeroCount())]))])</pre></div> </div></div><div class=\"sk-parallel\"><div class=\"sk-parallel-item\"><div class=\"sk-item\"><div class=\"sk-label-container\"><div class=\"sk-label fitted sk-toggleable\"><label>pipeline-1</label></div></div><div class=\"sk-serial\"><div class=\"sk-item\"><div class=\"sk-serial\"><div class=\"sk-item\"><div class=\"sk-estimator fitted sk-toggleable\"><input class=\"sk-toggleable__control sk-hidden--visually\" id=\"sk-estimator-id-32\" type=\"checkbox\" ><label for=\"sk-estimator-id-32\" class=\"sk-toggleable__label fitted sk-toggleable__label-arrow fitted\">Passthrough</label><div class=\"sk-toggleable__content fitted\"><pre>Passthrough()</pre></div> </div></div></div></div></div></div></div><div class=\"sk-parallel-item\"><div class=\"sk-item\"><div class=\"sk-label-container\"><div class=\"sk-label fitted sk-toggleable\"><label>pipeline-2</label></div></div><div class=\"sk-serial\"><div class=\"sk-item\"><div class=\"sk-serial\"><div class=\"sk-item\"><div class=\"sk-estimator fitted sk-toggleable\"><input class=\"sk-toggleable__control sk-hidden--visually\" id=\"sk-estimator-id-33\" type=\"checkbox\" ><label for=\"sk-estimator-id-33\" class=\"sk-toggleable__label fitted sk-toggleable__label-arrow fitted\">&nbsp;PolynomialFeatures<a class=\"sk-estimator-doc-link fitted\" rel=\"noreferrer\" target=\"_blank\" href=\"https://scikit-learn.org/1.4/modules/generated/sklearn.preprocessing.PolynomialFeatures.html\">?<span>Documentation for PolynomialFeatures</span></a></label><div class=\"sk-toggleable__content fitted\"><pre>PolynomialFeatures()</pre></div> </div></div></div></div></div></div></div><div class=\"sk-parallel-item\"><div class=\"sk-item\"><div class=\"sk-label-container\"><div class=\"sk-label fitted sk-toggleable\"><label>pipeline-3</label></div></div><div class=\"sk-serial\"><div class=\"sk-item\"><div class=\"sk-serial\"><div class=\"sk-item\"><div class=\"sk-estimator fitted sk-toggleable\"><input class=\"sk-toggleable__control sk-hidden--visually\" id=\"sk-estimator-id-34\" type=\"checkbox\" ><label for=\"sk-estimator-id-34\" class=\"sk-toggleable__label fitted sk-toggleable__label-arrow fitted\">ZeroCount</label><div class=\"sk-toggleable__content fitted\"><pre>ZeroCount()</pre></div> </div></div></div></div></div></div></div></div></div><div class=\"sk-item\"><div class=\"sk-estimator fitted sk-toggleable\"><input class=\"sk-toggleable__control sk-hidden--visually\" id=\"sk-estimator-id-35\" type=\"checkbox\" ><label for=\"sk-estimator-id-35\" class=\"sk-toggleable__label fitted sk-toggleable__label-arrow fitted\">&nbsp;RandomForestClassifier<a class=\"sk-estimator-doc-link fitted\" rel=\"noreferrer\" target=\"_blank\" href=\"https://scikit-learn.org/1.4/modules/generated/sklearn.ensemble.RandomForestClassifier.html\">?<span>Documentation for RandomForestClassifier</span></a></label><div class=\"sk-toggleable__content fitted\"><pre>RandomForestClassifier(criterion=&#x27;log_loss&#x27;, n_estimators=80)</pre></div> </div></div></div></div></div></div>"
      ],
      "text/plain": [
       "Pipeline(steps=[('featureunion-1',\n",
       "                 FeatureUnion(transformer_list=[('pipeline-1',\n",
       "                                                 Pipeline(steps=[('columntransformer',\n",
       "                                                                  ColumnTransformer(transformers=[('passthrough',\n",
       "                                                                                                   'passthrough',\n",
       "                                                                                                   <sklearn.compose._column_transformer.make_column_selector object at 0x7d34eb307cd0>)])),\n",
       "                                                                 ('simpleimputer',\n",
       "                                                                  SimpleImputer(fill_value='missing',\n",
       "                                                                                strategy='constant')),\n",
       "                                                                 ('onehotencode...\n",
       "                 VarianceThreshold(threshold=0.1557560591318)),\n",
       "                ('featureunion-2',\n",
       "                 FeatureUnion(transformer_list=[('pipeline-1',\n",
       "                                                 Pipeline(steps=[('passthrough',\n",
       "                                                                  Passthrough())])),\n",
       "                                                ('pipeline-2',\n",
       "                                                 Pipeline(steps=[('polynomialfeatures',\n",
       "                                                                  PolynomialFeatures())])),\n",
       "                                                ('pipeline-3',\n",
       "                                                 Pipeline(steps=[('zerocount',\n",
       "                                                                  ZeroCount())]))])),\n",
       "                ('randomforestclassifier',\n",
       "                 RandomForestClassifier(criterion='log_loss',\n",
       "                                        n_estimators=80))])"
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "est.fitted_pipeline_"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([1, 1, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1,\n",
       "       0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 1, 1, 0, 0,\n",
       "       1, 0, 0, 0, 0, 0])"
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "est.predict(X_test)"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "tpotenv",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.10.16"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
